<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
span:hover {
background: -webkit-gradient(linear,left top,right top,color-stop(0,#159686),color-stop(0.4,#fff),color-stop(0.5,#fff),color-stop(0.6,#159686),color-stop(1,#159686));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: animate 1.5s infinite;
}
@keyframes animate{from{background-position:-100px}to{background-position:100px}}
:root{
--le:orange;
}
h2{
color:var(--le);
}
</style>
</head>
<body>
<span>你好</span>
<h2>你好</h2>
</body>
</html>