スタイル分離プロパティ
例
id = "d"を使用して要素の新しいスタッキングコンテキストを作成します。
document.getElementById("d").style.isolation = "isolate";
定義と使用法
分離プロパティは、要素が新しいスタッキングコンテンツを作成する必要があるかどうかを定義します。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
isolation | 41.0 | 79.0 | 36.0 | Yes | 30.0 |
構文
分離プロパティを返します。
object.style.isolation
分離プロパティを設定します。
object.style.isolation = "auto|isolate|initial|inherit"
プロパティ値
Value | Description |
---|---|
auto | Default. A new stacking context is created only if one of the properties applied to the element requires it |
isolate | A new stacking context must be created |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 自動 |
---|---|
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:分離プロパティ
❮スタイルオブジェクト