DDR爱好者之家 Design By 杰米
本文介绍了CSS3实现网站商品展示效果图,分享给大家,具体如下:
html代码
<div class="product">
<ul>
<li>
<div class="pro-img">
<a href="#">
<img src="images/pms_1524883847.49276938!220x220.jpg" alt="">
</a>
</div>
<h3><a href="#">小米电视4A 43英寸青春版</a></h3>
<p class="desc">全高清屏 / 人工智能语音</p>
<p class="price">
<span>1499</span>元
<del>1699</del>
</p>
<div class="review">
<a href="#">
<span class="msg">一如既往的好,小米情怀</span>
<span class="auther"> 来自于 惊喜 的评价 </span>
</a>
</div>
</li>
</ul>
</div>
CSS3代码
* {
margin: 0;
padding: 0;
}
ul, ol {
list-style: none;
}
input, button {
outline: none;
border: none;
}
a {
text-decoration: none;
}
.clearfix::before,
.clearfix::after {
content: "";
height: 0;
line-height: 0;
display: block;
visibility: hidden;
}
.clearfix::after {
clear: both;
}
body {
padding: 100px;
background-color: #f5f5f5;
}
.product li {
float: left;
width: 234px;
height: 246px;
padding: 34px 0 20px;
z-index: 1;
margin-left: 14px;
margin-bottom: 14px;
background: #fff;
-webkit-transition: all .2s linear;
transition: all .2s linear;
position: relative;
}
.pro-img {
width: 150px;
height: 150px;
margin: 0 auto 18px;
}
.pro-img a {
width: 100%;
height: 100%;
}
.pro-img img {
display: block;
width: 100%;
height: 100%;
}
.product li h3 {
margin: 0 10px;
font-size: 14px;
font-weight: 400;
text-align: center;
}
.product li h3 a {
color: #333;
}
.desc {
margin: 0 10px 10px;
height: 18px;
font-size: 12px;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #b0b0b0;
}
.price {
font-size: 14px;
margin: 0 10px 10px;
text-align: center;
color: #ff6700;
}
.price del {
color: #b0b0b0;
}
.review {
position: absolute;
bottom: 0;
left: 0;
z-index: 3;
width: 234px;
height: 0;
overflow: hidden;
font-size: 12px;
background: #ff6700;
opacity: 0;
-webkit-transition: all .2s linear;
transition: all .2s linear;
}
.review a {
color: #757575;
display: block;
padding: 8px 30px;
outline: 0;
}
.review a span {
display: block;
margin-bottom: 5px;
color: #fff;
}
.product li:hover {
-webkit-box-shadow: 0 15px 30px rgba(0,0,0,0.1);
box-shadow: 0 15px 30px rgba(0,0,0,0.1);
-webkit-transform: translate3d(0, -2px, 0);
transform: translate3d(0, -2px, 0);
}
.product li:hover .review {
opacity: 1;
height: 76px;
}
运行效果图:
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米
暂无评论...
更新日志
2025年10月24日
2025年10月24日
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]
