CSS3实现文字流光渐变特效
2017-12-12 09:27
597 查看
制作流光文字有几个要点:text-fill-color一般设置为transparent(透明色),然后利用background-image和渐变颜色来设置文字的背景色,利用background-clip来实现文字的截取,再利用background-size设置扩大背景,已使运用animation的时候能达到动画的效果等。
<!DOCTYPE html>
<html
lang="en">
<head>
<meta
charset="UTF-8">
<title>Title</title>
<style>
._borderWrap{
width: 180px;
height: 150px;
position: absolute;
left: 23%;
top: 25%;
}
._border{
line-height:
145px;
text-align: center;
font-size: 40px;
font-weight:
bolder;
-webkit-text-fill-color:
transparent;
background-image:
-webkit-linear-gradient(left,#129835,#ece64825%,#12983550%,#F9E92B75%,rgb(40,150,38));
background-size:
200%,100%;
-webkit-background-clip:text;
-webkit-animation: word
5s linear infinite ;
}
@keyframes word {
0%{background-position:
0 0}
100%{background-position:
-100% 0}
}
</style>
</head>
<body>
<div
class="_borderWrap">
<div
class="_border">流光字体</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html
lang="en">
<head>
<meta
charset="UTF-8">
<title>Title</title>
<style>
._borderWrap{
width: 180px;
height: 150px;
position: absolute;
left: 23%;
top: 25%;
}
._border{
line-height:
145px;
text-align: center;
font-size: 40px;
font-weight:
bolder;
-webkit-text-fill-color:
transparent;
background-image:
-webkit-linear-gradient(left,#129835,#ece64825%,#12983550%,#F9E92B75%,rgb(40,150,38));
background-size:
200%,100%;
-webkit-background-clip:text;
-webkit-animation: word
5s linear infinite ;
}
@keyframes word {
0%{background-position:
0 0}
100%{background-position:
-100% 0}
}
</style>
</head>
<body>
<div
class="_borderWrap">
<div
class="_border">流光字体</div>
</div>
</body>
</html>
相关文章推荐
- CSS3实现文字流光渐变特效
- CSS3 实现文字流光渐变动画
- CSS3实现水位充满文字特效
- 用CSS3实现文字渐变效果
- 面试题1.闭合标签有哪些??CSS3中阴影,文字增加特效,渐变,旋转,缩放
- [HTML5&CSS3]纯css3实现的文字亮光特效
- 纯css3特效实现的文字亮光
- CSS3下的渐变文字效果实现
- CSS3下的渐变文字效果实现
- 纯css3实现的文字亮光特效
- css3 文字流光渐变 背景模糊 边框两边伸展
- CSS3下的渐变文字效果实现
- 用CSS3可以很简单地实现文字渐变效果
- 利用纯css3实现的文字亮光特效的代码演示
- CSS3下的渐变文字效果实现
- 纯css3实现的文字亮光特效
- [HTML5&CSS3]纯css3实现的文字亮光特效
- CSS3实现的渐变按钮,在IE7、IE6下的滤镜使用。
- Android的实现文字渐变效果和歌词进度的效果