插圖我試圖複製CSS「暗角」的效果,detailed on Trent Walton's site。問題與CSS的box-shadow:圖像
.vignette1 {
box-shadow:inset 0px 0px 85px rgba(0,0,0,.5);
-webkit-box-shadow:inset 0px 0px 85px rgba(0,0,0,.5);
-moz-box-shadow:inset 0px 0px 85px rgba(0,0,0,.5);
float: left;
}
.vignette1 img {
margin: 0;
position: relative;
z-index: -1;
width: 320px;
height: 247px;
}
它運作良好的隔離,但對我的生產現場,那裏的家長背景設置DIV覆蓋的z-index圖像上的問題 - 生活的jsfiddle demo here。
第二種方法 - 在原來的文章的評論中提到,並列入演示 - 效果很好,但我的形象已經被包裹在標籤 - 它不能低於它。
這是最好的形容這裏的實際問題。博客隨着時間的推移而變化或被取消。如果發生這種情況,問題就變得沒有用。 – mikemaccana 2012-06-22 15:15:19