gpt4 book ai didi

css - 交叉淡入淡出图像库,剩下 3 张图像

转载 作者:行者123 更新时间:2023-11-27 23:28:50 32 4
gpt4 key购买 nike

我有一个 fiddle ,如下所示,在位置 4(图片 4、图片 5、图片 6),我想要交叉淡入淡出(淡入/淡出) 要发生的图片库。目前该位置只显示图6

https://jsfiddle.net/k0vzthne/embedded/result

这是我在 fiddle 中使用的 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 中。

最佳答案

如果我理解正确,也许这会有所帮助:

.item
{
background: red;
display: inline-block;
position: relative;

width: 60px;
height: 60px;
}

.item:nth-child(2n)
{
position: absolute;
transition: opacity 400ms ease-in-out;
opacity: 0;
right: 0;
}

.item:hover + .item
{
background: green;
z-index: 1;
opacity: 1;
}
<div class="list">
<div class="item">1 </div>
<div class="item">2 </div>
<div class="item">3 </div>
<div class="item">4 </div>
<div class="item">5 </div>
<div class="item">6 </div>
</div>


关于css - 交叉淡入淡出图像库,剩下 3 张图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57599462/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com