当前位置:网站首页>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 .
边栏推荐
猜你喜欢

NPDP certification | how do product managers communicate across functions / teams?

Web APIs DOM 时间对象
The SQL response is slow. What are your troubleshooting ideas?

LeetCode 练习——剑指 Offer 26. 树的子结构

signed、unsigned关键字

Improving Multimodal Accuracy Through Modality Pre-training and Attention

剑指offer刷题记录1

Unity3d minigame unity webgl transform plug-in converts wechat games to use dlopen, you need to use embedded 's problem

新手程序员该不该背代码?

关于声子和热输运计算中BORN电荷和non-analytic修正的问题
随机推荐
(18) LCD1602 experiment
2014 Alibaba web pre intern project analysis (1)
MySQL数据库基本操作-DML
剑指offer刷题记录1
How big is the empty structure?
Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
[IELTS speaking] Anna's oral learning record part1
Typescript get function parameter type
Machine test question 1
The SQL response is slow. What are your troubleshooting ideas?
Heavyweight news | softing fg-200 has obtained China 3C explosion-proof certification to provide safety assurance for customers' on-site testing
变量与“零值”的比较
pytorch_ Yolox pruning [with code]
LeetCode 练习——剑指 Offer 26. 树的子结构
UE4蓝图学习篇(四)--流程控制ForLoop和WhileLoop
General implementation and encapsulation of go diversified timing tasks
Comparison between variable and "zero value"
Dealing with the crash of QT quick project in offscreen mode
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
BasicVSR_ Plusplus master test videos and pictures