這是一款CSS3鼠標(biāo)懸停圖片模糊過渡動畫特效。響應(yīng)式的圖片列表布局,通過鼠標(biāo)懸停在圖片上面的時候,圖片會以模糊方式切換,同時新的圖片顯示在原來的圖片上面。
使用方法:
1、head引入css文件
<!--響應(yīng)式框架-->
<link rel="stylesheet" type="text/css" href="css/bootstrap-grid.min.css" />
<!--圖標(biāo)庫-->
<link rel="stylesheet">
<!--核心樣式-->
<link rel="stylesheet" type="text/css" href="css/style.css" />
2、body引入部分
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-6">
<div class="product-grid">
<div class="product-image">
<a href="#" class="image">
<img class="pic-1" src="images/img-1.jpg">
<img class="pic-2" src="images/img-2.jpg">
</a>
<span class="product-discount-label">-20%</span>
<a class="product-like-icon" href="#"><i class="far fa-heart"></i></a>
</div>
<div class="product-content">
<h3 class="title"><a href="#">男式襯衫</a></h3>
<ul class="rating">
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star disable"></li>
</ul>
<div class="price"><span>$20.00</span> $16.00</div>
<a class="add-to-cart" href="">加入購物車</a>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="product-grid">
<div class="product-image">
<a href="#" class="image">
<img class="pic-1" src="images/img-3.jpg">
<img class="pic-2" src="images/img-4.jpg">
</a>
<span class="product-discount-label">-30%</span>
<a class="product-like-icon" href="#"><i class="far fa-heart"></i></a>
</div>
<div class="product-content">
<h3 class="title"><a href="#">女式棉質(zhì)上衣</a></h3>
<ul class="rating">
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
</ul>
<div class="price"><span>$27.00</span> $18.00</div>
<a class="add-to-cart" href="">加入購物車</a>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="product-grid">
<div class="product-image">
<a href="#" class="image">
<img class="pic-1" src="images/img-5.jpg">
<img class="pic-2" src="images/img-6.jpg">
</a>
<a class="product-like-icon" href="#"><i class="far fa-heart"></i></a>
</div>
<div class="product-content">
<h3 class="title"><a href="#">女式修身上衣</a></h3>
<ul class="rating">
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star disable"></li>
<li class="fas fa-star disable"></li>
</ul>
<div class="price">$22.50</div>
<a class="add-to-cart" href="">加入購物車</a>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="product-grid">
<div class="product-image">
<a href="#" class="image">
<img class="pic-1" src="images/img-7.jpg">
<img class="pic-2" src="images/img-8.jpg">
</a>
<a class="product-like-icon" href="#"><i class="far fa-heart"></i></a>
</div>
<div class="product-content">
<h3 class="title"><a href="#">男子夾克</a></h3>
<ul class="rating">
<li class="fas fa-star"></li>
<li class="fas fa-star"></li>
<li class="fas fa-star disable"></li>
<li class="fas fa-star disable"></li>
<li class="fas fa-star disable"></li>
</ul>
<div class="price">$26.30</div>
<a class="add-to-cart" href="">加入購物車</a>
</div>
</div>
</div>
</div>
</div>