1
我有一個div和內部的我使用img標籤如何設置背景圖片在img標籤的內容之前顯示?
和在樣式表中,我使用背景圖像用於該div和對準它的z索引值1居中放置一個圖像..
我用另一種風格與Z-index值-100
所以我希望的背景圖像來的圖像前該分區在img ..
我覺得我做錯了什麼
我的代碼是
.video-thumb
{
height:72px;
width:120px;
background:#ffffff;
background-image:url('http://doamin.com/images/play.png');
background-repeat:no-repeat;
background-position:center;
padding:4px;
border:#eceaea 1px solid;
margin:0 auto;
z-index:2;
}
.video-thumb img
{
z-index:-100;
}
<div class='video-thumb'>
<a href=\"somthing.php\">
<img id='thumb' width=120 height=72 src='http://domain.com/image1.jpg'></a>
</div>
其實我使用這個div來顯示視頻的縮略圖,並希望在縮略圖的div中央顯示播放按鈕圖像。這就是我打算做的事情。總是會有圖像在div裏面 – Vijay 2010-06-19 14:38:13