<div class="marquee">
<p>
跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯跑马灯
</p>
</div>```
```javascript
.marquee {
width: 100%;
overflow: hidden;
white-space: nowrap;
margin-bottom: 10px;
p {
display: inline-block;
animation: marquee 40s linear infinite;
}
}
@keyframes marquee {
0% {
transform: translateX(0);
}
10% {
transform: translateX(0);
}
100% {
transform: translateX(-100%);
}
}
横向跑马灯效果
最新推荐文章于 2024-08-27 15:59:21 发布