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 lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Typewriter Effect</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<p class="line">Typewriter effect using css()</p>
</body>
</html>
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{
margin: 0;
padding: 0;
font-family: sans-serif;
background: #121212;
}
.text{
text-align: center;
margin-top: 30vh;
}
.text h1{
font-size: 130px;
color: rgba(225,225,255,0.1);
background-image: url('image.jpg');
background-repeat: repeat-x;
background-clip: text;
animation: text 15s linear infinite;
}
@keyframes text{
0%{
background-position: 0 0;
}
50%{
background-position: 2000px 0;
}
}
No comments: