产品展示效果html,CSS3商品展示网格布局动画特效

这是一款CSS3商品展示网格布局动画特效。该特效中,以网格布局的方式来展示各种商品。当鼠标hover商品图片时,通过css3 transform来切换不同的图片,效果非常炫酷。

使用方法

HTML结构

该CSS3商品展示网格布局的HTML结构如下:

img-1.jpg

img-2.jpg

20% Off

Jacket

$45.00

$36.00

......

CSS样式

然后添加下面的CSS样式:

.product-grid{ text-align: center; }

.product-grid .product-image{

overflow: hidden;

position: relative;

}

.product-grid .product-image:before{

content: "";

background: rgba(0,0,0,0.02);

position: absolute;

top: 0;

left: 0;

bottom: 0;

right: 0;

z-index: 1;

}

.product-grid .product-image img{

width: 100%;

height: auto;

}

.product-grid .pic-1{

opacity: 1;

transform: rotateY(0);

transition: all 0.5s ease-out 0s;

}

.product-grid:hover .pic-1{

opacity: 0;

transform: rotateY(-90deg);

}

.product-grid .pic-2{

position: absolute;

top: 0;

left: 0;

opacity: 0;

transform: rotateY(-90deg);

transition: all 0.5s ease-out 0s;

}

.product-grid:hover .pic-2{

opacity: 1;

transform: rotateY(0deg);

}

.product-grid .social{

width: 100%;

background: #ededed;

padding: 0;

margin: 0;

list-style: none;

position: absolute;

bottom: 0;

left: 0;

opacity: 0;

z-index: 1;

transition: all 0.5s ease 0s;

}

.product-grid:hover .social{ opacity: 1; }

.product-grid .social li{ display: inline-block; }

.product-grid .social li a{

display: block;

width: 70px;

height: 70px;

line-height: 70px;

background: #ededed;

font-size: 20px;

color: #000;

transition: all 0.3s ease 0s;

}

.product-grid .social li a:hover{

background: #fff;

color: #d15f21;

}

.product-grid .discount{

width: 100%;

padding: 15px;

background: #e4f6ff;;

font-size: 18px;

font-weight: 700;

color: #000;

position: absolute;

bottom: 0;

left: 0;

}

.product-grid .product-content{ padding: 15px 0; }

.product-grid .title{

font-size: 20px;

font-weight: 600;

color: #000;

text-transform: capitalize;

margin: 0 0 5px 0;

}

.product-grid .price{

font-size: 16px;

font-weight: 600;

color: #d15f21;

margin-bottom: 5px;

}

.product-grid .price span{

display: inline-block;

color: #999;

text-decoration: line-through;

margin-right: 2px;

}

.product-grid .rating{

padding: 0;

margin: 0;

list-style: none;

}

.product-grid .rating li{

display: inline-block;

font-size: 10px;

color: #ffc000;

}

@media only screen and (max-width:990px){

.product-grid{ margin-bottom: 30px; }

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值