<!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>