blob: 257c47bb6329fe08e60d4c1d0e0990d77622d65e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
---
title: CSSValue.cssText
slug: Web/API/CSSValue/cssText
tags:
- API
- CSSValue
- Property
- Reference
- cssText
translation_of: Web/API/CSSValue/cssText
---
<div>{{APIRef("DOM")}}</div>
<p>{{domxref("CSSValue")}} インターフェイスの <code><strong>cssText</strong></code> プロパティは、現在計算されている CSS プロパティ値を表します。</p>
<h2 id="構文">構文</h2>
<pre class="syntaxbox notranslate"><var>cssText</var> = <var>cssValue</var>.cssText;
</pre>
<h3 id="値">値</h3>
<p>現在の CSS プロパティ値を表す {{domxref("DOMString")}} 。</p>
<h2 id="例">例</h2>
<pre class="brush: js; highlight[3] notranslate">var styleDeclaration = document.styleSheets[0].cssRules[0].style;
var cssValue = styleDeclaration.getPropertyCSSValue("color");
console.log(cssValue.cssText);
</pre>
<h2 id="仕様">仕様</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">仕様</th>
<th scope="col">ステータス</th>
<th scope="col">備考</th>
</tr>
<tr>
<td>{{SpecName('DOM2 Style', 'css.html#CSS-CSSValue-cssText', 'CSSValue.cssText')}}</td>
<td>{{Spec2('DOM2 Style')}}</td>
<td>初回定義</td>
</tr>
</tbody>
</table>
<h2 id="ブラウザー実装状況">ブラウザー実装状況</h2>
<div>
<p>{{Compat("api.CSSValue.cssText")}}</p>
</div>
<h2 id="関連項目">関連項目</h2>
<ul>
<li>{{domxref("CSSStyleDeclaration.getPropertyCSSValue()")}}</li>
</ul>
|