背景の塗り区画。
名前 | background-clip
|
---|---|
値 | <box># |
初期値 | border-box |
対象 | 全ての要素 |
継承 | されない |
百分率 | 受容しない |
算出値 | リスト:指定されたキーワードたちからなる |
アニメーション型 | 繰り返し可能なリスト |
背景が塗られる区画となる 背景塗り区画 を決定する。層値の構文は次で与えられる:
border-box
⤴
<DIV style="width:100px; background:linear-gradient(60deg,red,yellow,red,yellow,red); border:10px dotted #00f; padding:10px; font-size:30px; background-clip:border-box; ">テスト</DIV>
padding-box
⤴
<DIV style="width:100px; background:linear-gradient(60deg,red,yellow,red,yellow,red); border:10px dotted #00f; padding:10px; font-size:30px; background-clip:padding-box; ">テスト</DIV>
content-box
⤴
<DIV style="width:100px; background:linear-gradient(60deg,red,yellow,red,yellow,red); border:10px dotted #00f; padding:10px; font-size:30px; background-clip:content-box; ">テスト</DIV>
text
[Edge][Firefox][Firefox for Android] ⤴
<DIV style="width:100px; background:linear-gradient(60deg,red,yellow,red,yellow,red); border:10px dotted #00f; padding:10px; font-size:30px; background-clip:text; ">テスト</DIV>
<DIV style="width:100px; background:linear-gradient(60deg,red,yellow,red,yellow,red); border:10px dotted #00f; padding:10px; font-size:30px; background-clip:text; -webkit-background-clip:text; color:#fff0; ">テスト</DIV>
注記: 根要素については、異なる背景塗り区画を持つので、background-clip プロパティの効果はない。特別な要素の背景を見よ。
注記: 背景は常に、ボーダー(もしあれば)の背後に描かれる。[CSS2] の 積層文脈の詳説を見よ。
¶ background:linear-gradient(60deg,red,yellow,red,yellow,red);
の前に
background-clip プロパティを指定すると効果が出なかった。
表示内容: |
表示内容: |