Advertisement
Advertisement

Box Shadow Hover Effect 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">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <title>Document</title>
</head>
<body>
    <div class="box box-1"><i class="fa fa-power-off" style="font-size:100px;color:red"></i></div>
</body>
</html>
Advertisement

Box Shadow Hover Effect Css Code

body{
            background-color: #efefef;
            padding: 100px;
        }
        .box{
            display: flex;
            height: 200px;
            width:200px;
            border-radius: 5px;
            align-self: center;
            box-shadow: black;
            margin: auto;
            box-shadow: rgba(0, 0, 0, 0.15) 0px 15px 25px, rgba(0, 0, 0, 0.05) 0px 5px 10px;
            transition: 0.3s ease-in-out;
            
        }
        .box:hover{
            box-shadow: rgb(204, 219, 232) 3px 3px 6px 0px inset, rgba(255, 255, 255, 0.5) -3px -3px 6px 1px inset;
        }
        .box i{
            margin: auto;
            padding: auto;
        }