CSS实现字体特效
时间:2024年03月03日
/来源:网络
/编辑:佚名
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {text-align: center; font-size: 30px;}
#colorFont {
background-image: linear-gradient(to right, red, orange, yellow, green, blue, yellow, orange, red, orange, yellow, green, yellow, orange, red);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-background-size: 200% 100%;
-webkit-animation: colorFont-animation 800ms infinite linear;
}
@-webkit-keyframes colorFont-animation {
0%{ background-position: 0 0;}
100% { background-position: -100% 0;}
}
</style>
</head>
<body>
<span id="colorFont">欢迎大家留言交流技术,记得关注我哦!</span>
</body>
</html>
CSS实现字体特效效果图如下
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {text-align: center; font-size: 30px;}
#colorFont {
background-image: linear-gradient(to right, red, orange, yellow, green, blue, yellow, orange, red, orange, yellow, green, yellow, orange, red);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-background-size: 200% 100%;
-webkit-animation: colorFont-animation 800ms infinite linear;
}
@-webkit-keyframes colorFont-animation {
0%{ background-position: 0 0;}
100% { background-position: -100% 0;}
}
</style>
</head>
<body>
<span id="colorFont">欢迎大家留言交流技术,记得关注我哦!</span>
</body>
</html>
CSS实现字体特效效果图如下
新闻资讯 更多
- 【建站知识】查询nginx日志状态码大于400的请求并打印整行04-03
- 【建站知识】Python中的logger和handler到底是个什么?04-03
- 【建站知识】python3拉勾网爬虫之(您操作太频繁,请稍后访问)04-03
- 【建站知识】xpath 获取meta里的keywords及description的方法04-03
- 【建站知识】python向上取整以50为界04-03
- 【建站知识】scrapy xpath遇见乱码解决04-03
- 【建站知识】scrapy爬取后中文乱码,解决word转为html 时cp1252编码问题04-03
- 【建站知识】scrapy采集—爬取中文乱码,gb2312转为utf-804-03