スタイルtabSizeプロパティ
例
<pre>要素のtabSizeを設定します。
document.getElementById("myPRE").style.tabSize = "16";
定義と使用法
tabSizeプロパティは、タブ文字に使用されるスペースの長さを指定します。
HTMLでは、<textarea>や<pre>などの一部の要素を除いて、タブ文字は通常単一のスペース文字として表示され、tabSizeプロパティの結果はこれらの要素に対してのみ表示されます。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
tabSize | Yes | 79.0 | Not supported Use MozTabSize |
6.1 | 15.0 |
構文
tabSizeプロパティを返します。
object.style.tabSize
tabSizeプロパティを設定します。
object.style.tabSize = "number|length|initial|inherit"
プロパティ値
Value | Description |
---|---|
number | Default value 8. Specifies the number of space-characters that should be displayed for each tab-character |
length | Specifies the length of a tab-character. This property value is not supported in any of the major browsers |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 8 |
---|---|
戻り値: | 要素のタブサイズプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:tab-sizeプロパティ
❮スタイルオブジェクト