CSS 动画延迟问题

时间:2021-06-04 21:25:06

标签: html css

所以我一直在尝试与博物馆一起创建一个网站(作为一个项目),我尝试添加一些动画,动画效果很好,但我尝试延迟它(我有 7 个博物馆的小图像像气泡一样从底部到顶部)

.muzee img{
    width: 60px;
    animation: muzee 7s linear infinite;
}

.muzee {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: absolute;
    bottom: -70px;
}

@keyframes muzee{
    0%{
        transform: translateY(0);
        opacity: 0;
    }
    50%{

        opacity: 1;
    }
    70%{

        opacity: 1;
    }
    100%{
        transform: translateY(-80vh);
        opacity: 1;
    }
}

.muzee img:nth-chlid(1){
    animation-delay: 2s;
    width: 25px;
}
.muzee img:nth-chlid(2){
    animation-delay: 1s;
}
.muzee img:nth-chlid(3){
    animation-delay: 3s;
    width: 25px;
}
.muzee img:nth-chlid(4){
    animation-delay: 4.5s;
}
.muzee img:nth-chlid(5){
    animation-delay: 3.25s;
}
.muzee img:nth-chlid(6){
    animation-delay: 6s;
    width: 20px;
}
.muzee img:nth-chlid(7){
    animation-delay: 7s;
    width: 35px;
}

0 个答案:

没有答案
相关问题