<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.text {
background: linear-gradient(
to left,
oklch(71.9% 0.119 209.76 /1),
oklch(93% 0.003 106.451 /0.35) 80%,
oklch(71.9% 0.119 209.76 /1)
);
background-clip: text; /* 背景仅覆盖文字 */
-webkit-background-clip: text; /* 兼容旧版WebKit浏览器 */
color: transparent; /* 隐藏文字原本颜色 */
background-size: 200% auto; /* 背景宽度扩大2倍 */
animation: gradientMove 1.8s linear infinite;
}
@keyframes gradientMove {
100% {
background-position: -400%;
}
}
</style>
</head>
<body>
<div class="container">
<p class="text">Searching</p>
<p class="text">搜索中...</p>
</div>
<script></script>
</body>
</html>
index.html