/**
设置宽,溢出隐藏
*/
.marquee-outer-wrapper{
overflow: hidden;
width: 80%;
}
.marquee-inner-wrapper{
background: #eee;
height: 40px;
font-size: 14px;
color: red;
line-height: 40px;
margin: 0 auto;
white-space: nowrap;
position: relative;
}
/* 需要将两个文字内容一样的span放在最右边 */
.marquee-inner-wrapper span{
position: absolute;
top: 0;
left: 100%;
height: 100%;
}
/* 定义第一个span的animation:时长 动画名字 匀速 循环 正常播放 */
.first-marquee{
-webkit-animation: 25s first-marquee linear infinite normal;
animation: 25s first-marquee linear infinite normal;
padding-right: 70%;
}
@keyframes first-marquee {
0% {
-webkit-tr
本文发布于:2024-02-04 11:19:47,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170705989455098.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |