<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery自适应图片大小切换焦点图代码 - 源码搜藏网[www.codesocang.com]</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/zzsc.js"></script>
<style>
html{overflow:-moz-scrollbars-vertical ; overflow:scroll; overflow-x:hidden; overflow-y:hidden;} /*图片太高时出现了右侧滚动条 滚动条会让ul宽度变化的效果看起来有点震动! 所以这里去掉*/
*{padding:0 ; margin:0 ;}
ul{list-style:none;}
body{background:#CCCCCC;}
.container{width:100%; height:100%; margin-top:3%;}
.content{background:#ffffff; margin:0 auto; position:relative; width:220px; height:100px; border: 15px solid #ffffff;}
.content li{position:absolute; top:0; left:0; display:none;}
.content span{position:absolute; left:47%; top:45%;}
.content .left,.content .right{position:absolute; top:0; z-index:11;}
.content .left{cursor:url(images/cur-left.cur.ico), auto; left:0;}
.content .right{right:0; cursor:url(images/cur-right.cur.ico), auto;}
.bottom{height:0px; background:#ffffff; margin:0 auto; overflow:hidden; line-height:50px; padding: 0 15px;}
</style>
</head>
<body>
<div class="container">
<!-- 代码 开始 -->
<ul class="content">
<span><img src="images/5-121204193956-50.gif" width="32" height="32" /></span>
<div class="left"></div>
<div class="right"></div>
<li style="background:url(images/img_1.jpg); width:856px; height:482px;"></li>
<li style="background:url(images/img_3.jpg); width:816px; height:459px;"></li>
<li style="background:url(images/img_4.jpg); width:860px; height:484px;"></li>
<li style="background:url(images/img_5.jpg); width:960px; height:540px;"></li>
<li style="background:url(images/img_7.jpg); width:960px; height:540px;"></li>
</ul>
<div class="bottom">
共 <span id="imgdata">x</span> 张 / 第 <span id="xz">x</span> 张
</div>
<!-- 代码 结束 -->
</div>
</body>
</html>
热门源码