0

我想用伪元素 ::after 和 ::before 投射额外的阴影,以创建一种页面卷曲效果。但是每当<img>涉及到时,它的 src 就会一直覆盖阴影。这是一般限制还是有解决方法?

<ul>
    <li class="imgContainer"><img class="imgFake" /><br><span class="imageTag">some Title</span></li>

    <li class="imgContainer"><img class="imgFake" src="http://wallpaperstock.net/maggie-grace-portrait_wallpapers_14105_1600x1200.jpg"/><br><span class="imageTag">some Title</span></li>

    <li class="imgContainer" style="margin-bottom:50px;"><img class="imgFake" src="http://wallpaperstock.net/maggie-grace-portrait_wallpapers_14105_1600x1200.jpg"/><br><span class="imageTag" style="top:auto; bottom:27px;">some Title</span></li>
</ul>​

http://jsfiddle.net/BpgXC/7/

4

1 回答 1

1

请看一下:http: //jsfiddle.net/BpgXC/12/

我改变了img.imgFakez-index:

img.imgFake {
    position: relative;
    display: block;
    width: 400px;
    height: 250px;
    background: rgba(135,195,235,.5);
    padding: 5px;
    font: 12px/12px sans-serif;
    z-index: -2;
}
于 2012-08-11T09:54:54.963 回答