Loading Text Animation Effects Using html and css source code
Find awesome text animations that you can use in your web projects. We have handpicked any original text animation that thee can apply on different web design designs. From pure CSS to animated text effects you can find them all in hither.
HTML
Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.
After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.
<!DOCTYPE html>
<html>
<head>
<title>text animation</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 data-text="Loading Text..">Loading Text..</h1>
</body>
</html>
CSS
Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser
body{
background-color: #0e264e;
font-family: arial;
}
h1{
margin: 0;
padding: 0;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
font-size: 7em;
color: #8694a1;
}
h1:before{
content: attr(data-text);
position: absolute;
overflow: hidden;
max-width: 7em;
white-space: nowrap;
color: #fff;
animation: animated 4s linear infinite;
}
@keyframes animated{
0%{
max-width: 0;
}
}
No comments: