Skip to content

Instantly share code, notes, and snippets.

@mqxu
Created November 3, 2019 12:16
Show Gist options
  • Save mqxu/eafb4e02ad5601a50acf118aa403f9c7 to your computer and use it in GitHub Desktop.
Save mqxu/eafb4e02ad5601a50acf118aa403f9c7 to your computer and use it in GitHub Desktop.
【iCSS:色彩】使用linear-gradient控制文本渐变
<div class="bruce flex-ct-x">
<h1 class="gradient-text">Full Stack Developer</h1>
</div>
.gradient-text {
background-image: linear-gradient(90deg, #f66, #f90);
background-clip: text;
line-height: 60px;
font-size: 60px;
animation: hue 5s linear infinite;
-webkit-text-fill-color: transparent;
}
@keyframes hue {
from {
filter: hue-rotate(0);
}
to {
filter: hue-rotate(-1turn);
}
}
<link href="https://yangzw.vip/static/css/reset.css" rel="stylesheet" />
<link href="https://yangzw.vip/static/css/main.css" rel="stylesheet" />
<link href="https://yangzw.vip/static/css/theme.scss" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment