Code In HTML/CSS To give shadow to any element.

Code Output:

code:

<!DOCTYPE html>
<html lang="en">
<head>
    
    <title>Shadow</title>
    <style>
        body{
        background-color:yellow;
        }
        .ansub{
        margin:300px;
        color:black;
        transition:.6s;
        }
        button{
        position:auto;
        width:300px;
        height:300px;
        font-face:arial;
        }
        .ansub:hover{

        background:red;
        font-family:consolas;
        box-shadow:0 0 20px 20px blue;
        }
    </style>
</head>
<body>

    <button class="ansub">About Me</button></center>

    <button>Website</button>



</body>
</html>



Here I have given shadow to a button when it is hovered.










No comments:

Powered by Blogger.