鼠标移入时,文字逐一动画出现,但是鼠标移开后是同步移开而不是逐一移开
figure figcaption p,h2 {
transition: all, 0.35s;
}
.fimg figcaption p {
transform: translate(-100px);
margin: 5px;
}
/*nth-of-type(n):同级标签的兄弟元素,可写数字,也可以通过写odd或者even来设置奇偶*/
.fimg:hover figcaption p:nth-of-type(1) {
transition-delay: 0.05s;
}
.fimg:hover figcaption p:nth-of-type(2) {
transition-delay: 0.1s;
}
.fimg:hover figcaption p:nth-of-type(3) {
transition-delay: 0.15s;
}
.fimg:hover figcaption p {
transform: translate(0px, 0px);
}