@-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>