所以我有一个纯粹的风格 div 与 :before 位于图像下方,css 看起来像这样:
.the-image-div {
width: 100px;
height: 100px;
box-shadow: inset 0px 0px 3px white;
border: 1px gray solid;
position: relative;
z-index: 3;
}
.image-stack {
width: 100px;
height: 100px;
background: white;
border: 1px solid gray;
position: relative;
top:3px;
left: 3px;
z-index: 2;
}
.image-stack:before {
content: " ";
width: 100px;
height: 100px;
background: white;
border: 1px solid gray;
box-shadow: inset 0px 0px 1px white;
position: absolute;
top: 3px;
left: 3px;
z-index: 1;
}
让 jquery 不仅选择图像堆栈而且 :before 单独选择会很好。目标是在图像堆栈本身之后的几毫秒内将其淡化。想法?