Thứ Hai, 27 tháng 2, 2017

hover css ứng dụng

****html:
<div class="col-md-4 item-tax-porduct">
    <div class="thumb-item-tax-porduct">
        <a href="http://grando.vn/products/vach-ngan-he-grando-md/">
        <img src="http://grando.vn/wp-content/uploads/2016/04/MD_DD100000-350x213.jpg">
        </a>
        <div class="hover-effect-1">
          <div class="hover-inner">
              <a href="http://grando.vn/products/vach-ngan-he-grando-md/"></a>
          </div>
        </div>
    </div>
</div>

****css:
.thumb-item-tax-porduct{
    overflow: hidden;
    position: relative;
}
/* hover eff 1 */
.hover-effect-1 {
    opacity: 0;
    transition: 0.2s linear;
    -webkit-transition: 0.2s linear;
    height: 101%;
    width: 100%;
    top: 0;
    left: 0;
    position: absolute;
    overflow: hidden;
}
.hover-effect-1 .hover-inner {
    background-color: rgba(255, 255, 255, 0.70);
    bottom: 0;
    height: 100%;
    left: 0;
    position: absolute;
    right: 0;
    text-align: center;
    top: 0;
    -webkit-transform: scale(1, 0);
    -moz-transform: scale(1, 0);
    -o-transform: scale(1, 0);
    transform: scale(1, 0);
    transition: all 0.2s linear 0s;
    -webkit-transition: all 0.2s linear 0s;
    width: 100%;
    display: table;
}
.hover-effect-1 .hover-inner a {
    font-size: 28px;
    display: table-cell;
    vertical-align: middle;
    color: #ffffff;
}
.hover-effect-1:hover {
    opacity: 1;
    transition: 0.2s linear;
    -webkit-transition: 0.2s linear;
}
.hover-effect-1:hover .hover-inner {
    -webkit-transform: scale(1, 1);
    -moz-transform: scale(1, 1);
    -o-transform: scale(1, 1);
    transform: scale(1, 1);
    transition: all 0.2s linear 0s;
    -webkit-transition: all 0.2s linear 0s;

}

Không có nhận xét nào:

Đăng nhận xét