文字多颜色闪烁效果 - Css
示例代码
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>处理文本溢出</title>
<style>
.two {
position: absolute;
width: 300px;
height: 200px;
color: transparent;
font-size: 36px;
z-index: 999;
display: block;
background-size: 200% 200%;
-webkit-background-clip: text;
background-image: linear-gradient(45deg,red,green,blue,yellow,rgb(255, 0, 225));
animation: rotate-1 .5s linear 0s infinite alternate;
@keyframes rotate-1 {
background-position: 0% 50%;
/* transform: rotate(0deg); */
/* background-image: linear-gradient(0deg,red,green,blue); */
100% {
background-position: 100% 50%;
/* transform: rotate(360deg); */
/* background-image: linear-gradient(360deg,red,green,blue); */
</style>
</head>
<div class="two">
人生若如初见
何事秋风悲画扇