当前位置:网站首页>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 .
边栏推荐
- Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
- BasicVSR_PlusPlus-master测试视频、图片
- How big is the empty structure?
- config:invalid signature 解决办法和问题排查详解
- Windows Auzre 微软的云计算产品的后台操作界面
- 2022-07-05 use TPCC to conduct sub query test on stonedb
- Aardio - 利用customPlus库+plus构造一个多按钮组件
- OpenNMS分离数据库
- Installation and use of labelimg
- 在IPv6中 链路本地地址的优势
猜你喜欢
随机推荐
uniapp设置背景图效果demo(整理)
Uniapp setting background image effect demo (sorting)
memcached
[IELTS speaking] Anna's oral learning record part1
Aardio - integrate variable values into a string of text through variable names
2014阿里巴巴web前实习生项目分析(1)
在IPv6中 链路本地地址的优势
What are the specific steps and schedule of IELTS speaking?
CocosCreator+TypeScripts自己写一个对象池
ThreadLocal详解
Return keyword
sizeof关键字
const关键字
Aardio - does not declare the method of directly passing float values
2014 Alibaba web pre intern project analysis (1)
MySQL约束的分类、作用及用法
MySQL----初识MySQL
Sword finger offer question brushing record 1
Traversal of a tree in first order, middle order, and then order
Netxpert xg2 helps you solve the problem of "Cabling installation and maintenance"









