<!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>文字渐变效果</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
color: #fff;
}
/* h1 {
background-image: linear-gradient(
90deg,
#d6effe 0%,
#5898ff 29%,
#7a73f5 42%,
#9470f6 57%
);
background-clip: text;
color: transparent;
} */
h1 {
background-image: linear-gradient(
0deg,
#d6effe 0%,
#5898ff 29%,
#7a73f5 42%,
#9470f6 57%
);
background-clip: text;
color: transparent;
}
</style>
</head>
<body>
<h1>文字渐变效果,便于理解,简洁处理文字渐变效果</h1>
</body>
</html>