How To Make Tucked Corner Effect Hover Css

Video Is Also There After The Html Code Below

Css Codes
body {
  margin: 0;
  padding: 0;
  background: #3396FF;
  width: 100vw;
  height: 100vh;
}
.box {
  transform-origin: top;
  background: #fff;
  height: 400px;
  position: relative;
  margin: 70px auto;
  min-width: 200px;
  width: 30%;
  box-shadow: 0 2px 7px 3px rgba(0,0,0,.4);
  transition: 1s transform,
              .5s box-shadow;
}
h2{
  line-height: 400px;
  text-align: center;
  color: #124C8A;
}
.box::after,
.box::before {
  background: #3396FF;
  content: '';
  height: 50px;
  width: 80px;
  position: absolute;
  top: -30px;
  box-shadow: 0 7px 10px -8px rgba(0,0,0,0.5);
}
.box:after {
  right: -50px;
  transform: rotate(45deg);
}
.box:before {
  left: -50px;
  transform: rotate(-45deg);
}
#div1 {
  position: relative;
  height: 300px;
  margin: 70px auto;
  position: relative;
  width: 60%;
  perspective: 700px;
}
.box:hover{
    transform: rotateX(30deg);
    transform-style: preserve-3d;
    box-shadow:0 20px 25px 10px rgba(0,0,0,.4);
}
Html Codes

Comments