仿照京东做的一个鼠标移上去的图片文字说明效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{ padding:0; margin:0;}
.sd { width:210px; height:110px; border:solid 2px #ccc;
position:relative;
margin-top:50px;
margin-left:100px;

}
.sd span { display:block; width:100%; height:100%; overflow:hidden; position:relative;}
.sd span  img {-webkit-transition: all .35s; top:0px; position:absolute;}
p{
position:absolute;
bottom:0px;
height:30px;
line-height:30px; font-size:12px; text-indent:10px;
opacity:0;
background-color:rgba(0,0,0,.4);
color:#fff;
width:100%;
z-index:3;
-webkit-transition:all  0.3s ease 0;
-webkit-transform: perspective(300px) rotateX(-90deg) ;
-webkit-transform-origin: 50% 100%;
-webkit-transition: all .35s;}
.sd:hover p {  -webkit-transform: perspective(300px) rotateX(0deg);opacity:1;   }
.sd:hover span img { top:-30px; }
</style>
</head>

<body>

<div class="sd">
<span><img src="huiyuangou+_17.jpg" width="210" height="110" /></span>
<p>文字说明</p>

</div>


</body>
</html>

效果还是蛮不错的,推荐以后使用

转载于:https://www.cnblogs.com/xiaotian747/p/3701924.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值