adc

clicks

awesome text animation using html and css source code

This animated title effect by Robin Treur follows the style of many movies or video games. The letters take on a protruding 3D effect using CSS3 text shadows along with a slight diagonal slant.

The fade-in animation style reminds me of classic movies from the 1930s with the same slanted text. Everything is controlled through CSS but the “restart” button is built using JavaScript. This way you can play the animation many times over to get a better look

 


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>Awesome Text Animation</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <div class="banner">
        <div class="wrapper">
            <div class="text">
                <h2>John Abrahim</h2>
                <h3>Front-End-devoloper</h3>
            </div>
        </div>
    </div>

</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{
    margin: 0;
    padding: 0;
    font-family: poppins;
}

.banner{
    min-height: 100vh;
    background-image: url(bg.jpg);
    -webkit-background-size:cover;
    background-size: cover;
    background-position: center center;
}

.wrapper{
    position: absolute;
    width: 100%;
    height: 100%;
    display: grid;
    justify-content: center;
    align-items: center;
}
.text{
    position: absolute;
    top:50%;
    left: 10%;
    transform: translateY(-50%);
    max-width: 700px;
}

 h2,
 h3{
    position: relative;
    margin:0;
    padding: 0;
    display: inline-block;
    transform-origin: left;
    text-transform: uppercase;
    transform: scale(0);
    animation: animate-1 1s ease forwards;
}

h2{
    font-size: 5em;
    animation-delay: 2s;
    color: black;
}

h3{
    font-size: 2em;
    animation-delay: 2s;
    color: black;
}

h2:before,
h3:before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    height: 100%;
    width: 100%;
    transform-origin: right;
    animation: animate-2 1s ease forwards;
    animation-delay: 3s;
}

h3:before{
    animation-delay: 4s;
}

@keyframes animate-2{
    0%{
        transform: scaleX(1);
    }
    100%{
        transform: scaleX(0);
    }
}
@keyframes animate-1{
    0%{
        transform: scaleX(0);
    }
    100%{
        transform: scaleX(1);
    }
}

 

 

Source Code 

 

Watch Video 

 

Youtube Channel

 

 



awesome text animation using html and css source code awesome text animation using html and css source code Reviewed by easycoding on August 20, 2020 Rating: 5

No comments:

Powered by Blogger.