Button Với Hiệu Ứng Cực Đẹp Style 2

DESBLOG. Sẽ hướng dẫn tiếp cho các bạn cách tạo ra một Button có hiệu ứng hover tuyệt đẹp. Với Style 2 này chắc sẽ làm các bạn hài lòng.

CSS: Thêm đoạn CSS này dưới thẻ ]]></b:skin>
.middle{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}
.btn{
  position: relative;
  display: block;
  color: white;
  font-size: 14px;
  font-family: "montserrat";
  text-decoration: none;
  margin: 30px 0;
  border: 2px solid #ff7675;
  padding: 14px 60px;
  text-transform: uppercase;
  overflow: hidden;
  transition: 1s all ease;
}
.btn::before{
  background: #ff7675;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  z-index: -1;
  transition: all 0.6s ease;
}
.btn1::before{
 width: 0%;
  height: 100%;
}
.btn1:hover::before{
  width: 100%;
}
.btn2::before{
  width: 100%;
  height: 0%;
}
.btn2:hover::before{
  height: 100%;
}
.btn3::before{
  width: 100%;
  height: 0%;
  transform: translate(-50%,-50%) rotate(45deg);
}
.btn3:hover::before{
  height: 380%;
}
.btn4::before{
  width: 100%;
  height: 0%;
  transform: translate(-50%,-50%) rotate(-45deg);
}
.btn4:hover::before{
  height: 380%;
}

Thêm đoạn CODE này vào nơi bạn muốn nó hiển thị
<div class="middle">
<a href="" class="btn btn1">Hover Me</a>
<a href="" class="btn btn2">Hover Me</a>
<a href="" class="btn btn3">Hover Me</a>
<a href="" class="btn btn4">Hover Me</a>
Nếu có gì thắc mắc hãy bình luận mình sẽ hỗ trợ nhé

Popular posts from this blog

Vietnix Free DirectAdmin, Giảm 30% trọn đời dịch vụ VPS

Vui Trung Thu nhận quà vi vu cùng Z.com Việt Nam

AZDIGI Giảm mạnh 50% Hosting chất, khuyến mãi Ngất