css3⽂字横向⽆缝滚动 <div class="notice-container">
<i class="horn fa fa-bullhorn"></i>
<div class="header-notice-marquee" id="notice-marquee">
<span class="header-marquee-item1">尊敬的会员您好,如您遇到⽆法充值问题</span> <span class="header-marquee-item2">尊敬的会员您好,如您遇到⽆法充值问题</span> </div>
</div>
.notice-container {
padding: 0 10px;
align-items: center;
margin: 0 auto;
display: flex;
flex-direction: row;
flex: 1;
marquee marquee}
.header-notice-marquee {
white-space: nowrap;
overflow: hidden;
position: relative;
width: 100%;
height: 20px;
line-height: 20px;
}
.notice-container .header-marquee-item1 {
margin: 0 10px;
position: absolute;
left: 0;
animation: marquee1 15s linear 8;
}
.notice-container .header-marquee-item2 {
margin: 0 10px;
position: absolute;
left: 0;
animation: marquee2 15s linear 8;
}
.
notice-container .header-notice-marquee:hover {
animation-play-state: paused;
}
.notice-container .header-notice-marquee .header-marquee-item {
position: absolute;
top: 0;
left: 0;
white-space: nowrap;
}
@keyframes marquee1 {
0% {
left: 0;
}
100% {
left: -100%;
}
}
@keyframes marquee2 {
0% {
left: 100%;
}
100% {
left: 0%;
}
}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论