HTML&CSS

z-index プロパティ

HTML&CSS

z-index プロパティ

z-index プロパティ

要素の重なりの順序を指定

主な値

auto:
初期値。

数値:
値が大きいものほど上に重なる


(例)
■html

<p><span class="left0">Stack Up </span></p>
<img src="../images/white.gif" alt="sample" class="sample">



■css

p.sample {
color: #000; background-color: #fff;
position: relative; top: 50px; z-index: 2;
}
img.sample {
position: relative; top: -50px; z-index: 1;
}

関連記事

T-shirt&General goods

関連アイテムはまだありません。

image

HTMLやCSSのメモブログです。

Theme archive
Archive
Tag



toppage
PAGE TOP