DEV Community

Haisam
Haisam

Posted on

simple animation slider 😘

Image description
Remember, the actual content and structure of your "index.html" file will vary based on the specific requirements and design of your website.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h1{
            position: relative;
        }
        h1::after{
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            height: 3px;
            width: 0%;
            background-color: black;
            transition: 1s;
        }
        h1:hover::after{
            width: 100%;
        }
    </style>
</head>
<body>
    <div><h1>Hello world!!!</h1></div>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)