仿天猫图片展示效果2

<!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=gb2312" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<style>
*{
  margin:0;
  padding:0;
}
li{
  list-style:none;
}
a{
  text-decoration:none;
  color:#000;
}
.twoD{
  width:200px;
  height:320px;
  border:1px solid #000;
  margin-left:100px;
  overflow:hidden;
  padding-top:5px;
  padding-bottom:5px;
  position:relative; /*解决ie6,7对overflow:hidden的处理*/
}
.imgS, .imgX{
  width:500px;
  height:150px;
  position:relative;
}
.imgX{
  border-top:1px dotted #ccc;
}
.imgSZ{
  padding-top:30px;
  padding-left:20px;
}
.imgSZ li{
  padding-top:5px;
}
.imgSY{
  position:absolute;
  left:120px;
  top:0;
}
.productIntro{
  display:inline-block;
  vertical-align:top;
  padding-top:50px;
  padding-left:10px;
}
.inline{*display:inline;}  /*解决ie6,7不识别display:inline-block*/
.imgSY img{
  background-color:#999;
  width:150px;
  height:150px;
}
</style>
</head>

<body>
<div class="twoD">
  <div class="imgS">
     <div class="imgSZ">
     <h3>标题</h3>
  <ul>
     <li><a href="#">内容1</a></li>
     <li><a href="#">内容2</a></li>
     <li><a href="#">内容3</a></li>
  </ul>
  </div>
  <div class="imgSY">
     <img src="img5.jpg" />
  <div class="productIntro inline">
     <h3>产品名称</h3>
     <p>产品描述</p>
  </div>
  </div>
  </div>
  <div class="imgX">
     <div class="imgSZ">
     <h3>标题</h3>
  <ul>
     <li><a href="#">内容1</a></li>
     <li><a href="#">内容2</a></li>
     <li><a href="#">内容3</a></li>
  </ul>
  </div>
  <div class="imgSY">
     <img src="img5.jpg" />
  <div class="productIntro inline">
     <h3>产品名称</h3>
     <p>产品描述</p>
  </div>
  </div>
  </div>
</div>

<script type="text/javascript">
/*
* 仿天猫图片展示效果2
* ie6,7,8,ff,opera中测试可用,其他浏览器未测;
********made by keimon *****************
***********2013-03-06******************
*/
$(function(){
  $('.imgSY').hover(function(){
     $(this).stop().animate({'left':'-30px'},'slow');
  },function(){
     $(this).stop().animate({'left':'120px'},'slow');
  })
})
</script>


</body>
</html>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值