CSS实现上下循环滚动效果HTML:三字经幼儿跟读版
<div class="wrap">
<div class="content">
<p>第⼀⾏数据</p>
<p>第⼆⾏数据</p>
</div>
</div>
CSS:
.wrap{height:30px;overflow: hidden;position: absolute;top:30;left: 100;width: 100%}
p{margin:0;height: 30px;width: 100%}
客随主便.content p{
position: absolute;
}
@-webkit-keyframes anim1{长孙道生
0% {top: 30px;opacity: 1}
少年巴比伦小说
50% {top: -30px;opacity: 1}
75% {top: -30px ;opacity: 0}
100%{top:30px;opacity: 0}
}
@-webkit-keyframes anim2{花费英语单词
0% {top: -30px;opacity: 0}
25% {top: 30px;opacity: 0}
50% {top: 30px;opacity: 1}
品牌授权书范本100%{top: -30px;opacity: 1}
}
.content p:nth-child(1){background-color: red;}
nuk是什么牌子.content p:nth-child(2){background-color: yellow;}
.content p:nth-child(1){
电影爱人在线观看-webkit-animation: anim1 3s linear infinite;
}
.content p:nth-child(2){
-webkit-animation: anim2 3s linear infinite;
}