HTML&CSSWeb Development Projects

How to make Text Stroke Animation Using CSS Only?

Dear friends in this articles we learn about how to make Text Stroke Animation using CSS only. If you like our article then visit more.

Text Stroke Animations

First of all, you have to download a code editor in which we can write our code, we are telling you the names of some code editors, Visual Studio Code, this is the most used and most people use it because some of its features are very Works easily in writing our code quickly and it has built-in tags and properties, with the help of which we make our code very easy for Text Stroke Animation.

After this, you have to open the code editor and save it by selecting a new file and remember that while saving the file, you must write dot html because the browser has to explain it from html itself, without html we can not run any language That’s why it is very important for us to come to html. Now you have to do coding, your file has also been created, now time has come to do your coding, so before starting coding, you must know about html css because whatever code we will write, it is in html and css only. That’s why these languages are very important to you, so let’s start coding now for Text Stroke Animation.

How to start.

Press ctrl + 1 and see the shortcut feature of Visual Studio Code in front of you, using which makes our work easy and very quick, when you do ctrl + 1, then the complete syntax of html will open in front of you, using which we create a website We can create web applications, all the code that is written is written inside it, so it is very important for us to learn html if we want to become a web developer, then well then we know how login form design from further coding do.

Text Stroke

Font design or typography is intrinsic in clearly expressing a message and attracting visitors to a website. Font developers help to ensure that the text is inviting to readers. One of the features they use is CSS text animation to improve the design. If users want to create a minimalist text design, they can opt for the half-baked features. But the good news is that website users can have a simple text design that fits their needs and preferences. Users can choose from trigger-based action or an autoloading effect. Read on to discover handpicked text animations that show the creative side of a website.

HTML for text stroke animation

Now open your vs code editor and go to the right top section and click on file and select new file then save filename.html after this press ctrl+1 then html syntax generate automatically on your editor. This feature inbuild only visual code editor so i suggested you download this editor and make projects easily because it is a best code editor software. And this design for text stroke animation project make a fast with visual studio code editor.

Now we will learn how to write html for text stroke animation. So let’s know that first you have to go to the body tag, after that you will take the div tag and together with the class whose name is to be named motor. Then after that we will take div tag again and we will name its class as stand. Again we will take div tag and name its class as bottom stand after that we will take div tag again and we will name its class as petal1. Again we will take div tag and name its class as Pankhdi 2, then again take div tag and name its class as Pankdi 3. Now in the last we will take the div tag and name its class as center.

Friends, now we will tell you how much code we have to write in html to make text stroke animation so that we can easily create text stroke. So let’s know that first you have to come in the body tag and then take the svg tag, then inside that you have to take the id and name the text of that id. After that you have to take text tag then take text anchor in it.

CSS for Text Stroke

Now we will design the stand fan using css. So let’s design, first of all you have to know how we write css. We write css in 3 ways first we can write inline and second we can write it internal and third we can write it external so that we have to create new css file but in this article we have used internal css so that We will not have to create css file separately and we can work inside the same file.

First of all we have to go inside the head section and going inside we have to take style tag then we will take * tag and by applying curly braces open and close in it we will keep margin as 0 and padding as 0. And will keep its box sizing border box. Then we will take the body tag and flex the display in it, then we will center the justify content, after that we will center the align items and also make the background color rgb.

*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: rgb(22, 22, 22);
}

After that you have to take svg tag and in that you have to give position absolute, after that you have to do 50% from top and 50% from left also. After that you have to put transform translate -50%, -50% then you have to take width 100% and also take height as 350px.

svg{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 100%;
height: 350px;
}

This article highlights pure CSS animated text effects that web owners and admins can use for their web pages.

Source Code..

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Stroke Animation</title>
    <style>
       *{
           margin: 0;
           padding: 0;
           box-sizing: border-box;
       }
       body{
           display: flex;
           justify-content: center;
           align-items: center;
           min-height: 100vh;
           background-color: rgb(36,36,36);
           font-family: sans-serif;
       }
       svg{
           position: absolute;
           top: 50%;
           left: 50%;
           transform: translate(-50%,-50%);
           width: 100%;
           height: 350px;
       }
       svg text{
           font-size: 200px;
           fill: rgba(0,0,0,0);
           stroke: #fff;
           stroke-linejoin: round;
           stroke-dasharray: 100;
           animation: animate 2s linear infinite;
       }
       @keyframes animate{
           100%{
               stroke-dashoffset: 200;
           }
       }
    </style>
</head>
<body>
    <svg>
        <symbol id="text">
           <text text-anchor="middle" x="50%" y="60%">Designer</text>
        </symbol>
        <use xlink:href="#text"></use>
    </svg>
</body>
</html>

Watch video related this article…

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button