【发布时间】:2019-08-21 21:41:12
【问题描述】:
我有一个如下所示的小提琴,在 位置 4(图 4、图 5、图 6),我想要 cross-fade(fade-in/fade-out ) 图片库。目前该位置只显示图6。
https://jsfiddle.net/k0vzthne/embedded/result
这是我在小提琴中使用的 CSS 代码。目前,我在位置 4 看不到任何交叉淡入(淡入/淡出)图像库。
.featured-block a:nth-of-type(4), .featured-block a:nth-of-type(5), .featured-block a:nth-of-type(6) {
position: absolute;
right: 568px;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 12s;
opacity: 1;
}
.featured-block a:nth-of-type(4) {
animation-delay: 0s;
}
.featured-block a:nth-of-type(5) {
animation-delay: 4s;
}
.featured-block a:nth-of-type(6) {
animation-delay: 8s;
}
@keyframes cf4FadeInOut {
0% {opacity: 0;}
20% {opacity: 1;z-index: 999;}
33% {opacity: 1;}
53% {opacity: 0;z-index: 1;}
100% {opacity: 0;}
}
问题陈述:
我想知道我应该在 上面的 CSS 代码中进行哪些更改,以便 交叉淡入淡出图片库发生在 位置 4(包含图片 4、图片 5 和图片 6) 有 3 张图像左侧 出现在小提琴中,现在位于 位置 1、位置 2 和位置 3。
【问题讨论】:
标签: css css-animations fadein fadeout cross-fade