Using Scale in the Transition along with moving background image

Using Scale in the Transition along with moving background image


HTML 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>Document</title>
    <link rel="stylesheet" href="./try.css">
</head>
<body>
    <header><a href="https://www.unspash.com">Hover me</a></header>
</body>
</html>

CSS CODE:

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    font-size: 62.5%;
}



header{
    background: linear-gradient(rgb(0,0,0,0.5), rgb(0,0,0,0.5)), url("./canada.jpg");
    height: 100vh;
    background-size: 400%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: madan 10s infinite;
}

@keyframes madan{
    0%{
        background-position: 0 0;
    }

    50%{
        background-position: 100% 100%;
    }

    75%{
        background-position: 0 100%;
    }

    100%{
        background-position: 0 0;
    }
}



a{
    font-size: 3rem;
    padding: 1rem;
    text-decoration: none;
    color: white;
    transition: all 0.5s ease-in-out;
   
}

a:hover{
    transform: scale(200%, 200%);
    border: 2px solid black;
    background-color: rgb(229, 255, 0);
    color: black;
   
}

Comments

Popular posts from this blog

CSS simple grid layout

Gsap timeline position parameters

GSAP Timelines