是否可以使用jquery在淡入淡出之前进行一次:转换?

是否可以使用jquery在淡入淡出之前进行一次:转换?,jquery,css,Jquery,Css,因此,我有一个纯风格的div,前面是一个:放在一张图片下面,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

因此,我有一个纯风格的div,前面是一个:放在一张图片下面,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将是一件好事。目标是在图像堆栈本身之后的几毫秒内使其淡入淡出。想法?

JavaScript不能与伪元素交互。我将改为:before应用于一个类,该类随后添加到元素中,然后使用CSS转换使其淡入