当前位置:网站首页>How to achieve text animation effect
How to achieve text animation effect
2022-07-06 22:42:00 【Phil Arist】
This small project is a CSS Achieved text animation effect , Mainly used in the effect of page loading , Now? , Let's take a look at the final effect of this project :
HTML Code :
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS Achieve text animation effect </title>
</head>
<body>
<h1 data-text=" Loading ..."> Loading ...</h1>
</body>
</html>
CSS Code :
{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
body
{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #252839;
}
h1
{
position: relative;
font-size: 14vw;
color: #252839;
line-height: 1.2em;
text-transform: uppercase;
-webkit-text-stroke: 0.3vw #383d52;
}
h1:before
{
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
color: #01fe87;
overflow: hidden;
-webkit-text-stroke: 0vw #383d52;
border-right: 4px solid #01fe87;
animation: animate 4s linear infinite;
}
@keyframes animate
{
0%,10%,100%
{
width: 0;
}
70%,90%
{
width: 100%;
}
}
At the end
The above is the whole content of daily practice , I hope today's little exercise is useful to you , If you think it helps , Please praise me , Pay attention to me , And share it with your development friends , Maybe it can help him .
边栏推荐
- Should novice programmers memorize code?
- Heavyweight news | softing fg-200 has obtained China 3C explosion-proof certification to provide safety assurance for customers' on-site testing
- 专为决策树打造,新加坡国立大学&清华大学联合提出快速安全的联邦学习新系统
- Jafka source analysis processor
- Puppeteer连接已有Chrome浏览器
- Aardio - does not declare the method of directly passing float values
- How do I write Flask's excellent debug log message to a file in production?
- Signed and unsigned keywords
- [untitled]
- How big is the empty structure?
猜你喜欢
剑指offer刷题记录1
The SQL response is slow. What are your troubleshooting ideas?
Aardio - construct a multi button component with customplus library +plus
Mysql database basic operations DML
Improving Multimodal Accuracy Through Modality Pre-training and Attention
Sword finger offer question brushing record 1
pytorch_YOLOX剪枝【附代码】
NPDP certification | how do product managers communicate across functions / teams?
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
Mysql 身份认证绕过漏洞(CVE-2012-2122)
随机推荐
Mysql 身份认证绕过漏洞(CVE-2012-2122)
视图(view)
Sword finger offer question brushing record 1
Improving Multimodal Accuracy Through Modality Pre-training and Attention
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
leetcode:面试题 17.24. 子矩阵最大累加和(待研究)
自定义 swap 函数
Aardio - construct a multi button component with customplus library +plus
枚举与#define 宏的区别
MySQL教程的天花板,收藏好,慢慢看
rust知识思维导图xmind
2022-07-05 stonedb sub query processing parsing time analysis
How to use flexible arrays?
return 关键字
Pit encountered by handwritten ABA
MATLAB小技巧(27)灰色预测
Dealing with the crash of QT quick project in offscreen mode
MySQL----初识MySQL
项目复盘模板
OpenNMS分离数据库