我试图获取一个透明的png框架图片,悬停在img标签上,以创建它上面的框架外观。我尝试了多种不同的方法,但似乎都不起作用。
我最近使用的方法是http://www.cssbakery.com/2009/06/background-image.html,但这也似乎不起作用。 HTML
我最近使用的方法是http://www.cssbakery.com/2009/06/background-image.html,但这也似乎不起作用。 HTML
<div class="filler">
<div class="filler-picture">
<img src="../../media/img/test.jpg" alt="test" />
<div class="filler-mask"> </div>
</div>
</div>
CSS
.filler {
padding-left:20px;
height:361px;
width:559px;
float:left;
}
.filler-mask {
background: url('..img/filler.png') no-repeat;
position: absolute;
left:0; top:0;
height:361px;
width:559px;
}
.filler-picture {
z-index: 0;
background: url('..img/test.jpg') no-repeat;
position: relative;
height: 361px;
width: 559px;
display: block;
}
有人知道为什么这不起作用吗?