@-webkit-keyframes fontChange {
0% {
background-position: 0 0
}
100% {
background-position: 0 -100%
}
}
.leftAside {
position: absolute;
top: 33%;
left: 2%;
z-index: 1;
width: 1rem;
/* background-image: -webkit-linear-gradient(bottom, rgba(8, 89, 160, 1), rgba(255, 255, 255, 1), rgba(8, 89, 160, 1), rgba(255, 255, 255, 1));
-webkit-background-clip: text;
-webkit-text-fill-color:transparent;
animation: fontChange 1000ms steps(4) infinite;
-webkit-animation: fontChange 2s steps(4) infinite; */
background-image: -webkit-linear-gradient(top, #135ab8, #0889e2 25%, #249ef3 50%, #00dcff 75%, #135ab8);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-background-size: 100% 200%;
-webkit-animation: fontChange 2s infinite linear;
animation: fontChange 2s infinite linear;
}
.rightAside {
position: absolute;
top: 33%;
right: 2.8%;
z-index: 1;
width: 1rem;
background-image: -webkit-linear-gradient(top, #135ab8, #0889e2 25%, #249ef3 50%, #00dcff 75%, #135ab8);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-background-size: 100% 200%;
-webkit-animation: fontChange 2s infinite linear;
animation: fontChange 2s infinite linear;
}
...
<!-- 左右两侧侧边栏 -->
<div class="aside">
<div class="leftAside">让生活更美好</div>
<div class="rightAside">让生活更美好</div>
</div>
通过css实现竖排文字扫光闪烁效果
最新推荐文章于 2025-06-14 13:02:49 发布
本文详细介绍了如何使用CSS技术,创造出独特的竖排文字扫光闪烁效果,适用于网页动态展示,增加了视觉吸引力。内容包括关键CSS属性的设置和动画效果的实现方法。

1141

被折叠的 条评论
为什么被折叠?



