gpt4 book ai didi

html - CSS/HTML Raising Bars 效果无法正常工作

转载 作者:行者123 更新时间:2023-11-28 18:17:56 26 4
gpt4 key购买 nike

我想要这个,但不是颠倒的,我想要从下到上的方向。 http://dabblet.com/gist/4405823

我试过下面的代码但是没有用,你能帮我写这段代码吗:

<style>
/** Pure CSS wave effect **/
div.wave{
position: absolute
;
width: 100%;
}
div.wave > span{
float:left;
width: 10%;
height: 200px;
-webkit-animation: animate 1.5s ease-in-out alternate infinite;
}
div.wave > span:nth-child(1){
background-color: #B58900;
}
div.wave > span:nth-child(2){
background-color: #F7877C;
-webkit-animation-delay: .2s;
}
div.wave > span:nth-child(3){
background-color: #0E7DA8;
-webkit-animation-delay: .4s;
}
div.wave > span:nth-child(4){
background-color: #C4EADF;
-webkit-animation-delay: .6s;
}
div.wave > span:nth-child(5){
background-color: #B4A4CB;
-webkit-animation-delay: .8s;
}
div.wave > span:nth-child(6){
background-color: #FBD92F;
-webkit-animation-delay: 1s;
}
div.wave > span:nth-child(7){
background-color: #268BD2;
-webkit-animation-delay: 1.2s;
}
div.wave > span:nth-child(8){
background-color: #859900;
-webkit-animation-delay: 1.4s;
}
div.wave > span:nth-child(9){
background-color: #BBFFFF;
-webkit-animation-delay: 1.6s;
}
div.wave > span:nth-child(10){
background-color: #FFE8E8;
-webkit-animation-delay: 1.8s;
}
@-webkit-keyframes animate{
to { height: 100px; }
}

</style>

</head>
<body>
<div class='wave' style="position:absolute; bottom:0; width:100%;height:60px">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>

提前致谢

最佳答案

在我看来,您还需要添加一个与新高度相同的 margin-top:

@keyframes animate{

to {
height: 100px;
margin-top:100px;
}

}

这是修改后的功能 wave:http://dabblet.com/gist/6001816

关于html - CSS/HTML Raising Bars 效果无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17660235/

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