本文章收藏了一款圖片左右滾動代碼源碼下載,是一款利用js實現的廣告圖片可左右滾動的圖片廣告代碼,這是來自于淘寶網站焦點圖代碼。
<!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>可控制圖片左右滾動js代碼</title>
<script src="js/tbhb.js" type=text/網頁特效></script>
<link href="css教程/css.css" type=text/css rel=stylesheet>
</head>
<body>
<div class=main-wrap>
<div id=slide-box>
<b class=corner></b>
<div class=slide-content id=j_slide>
<div class=wrap>
<ul class=ks-switchable-content>
<li><a href="HTTP://www.jzread.com/" target=_blank><img alt="jzread.com" src="images/01.jpg"> </a></li>
<li><a href="HTTP://www.jzread.com/" target=_blank><img alt="jzread.com" src="images/02.jpg"> ;</a></li>
<li><a href="HTTP://www.jzread.com/" target=_blank><img alt="jzread.com" src="images/03.jpg"> ;</a></li>
<li><a href="HTTP://www.jzread.com/" target=_blank><img alt="jzread.com" src="images/04.jpg"> ;</a></li>
<li><a href="HTTP://www.jzread.com/" target=_blank><img alt="jzread.com" src="images/05.jpg"> ;</a></li>
<li><a href="HTTP://www.jzread.com/" target=_blank><img alt="jzread.com" src="images/06.jpg"> </a></li>
</ul>
</div>
<div class=ks-switchable-triggers>
<a class=prev id=j_prev href="javascript:void(0);" >
<b class=corner></b><span>&#8249;</span><b class=corner></b></a >
<a class=next id=j_next href="javascript:void(0);" >
<b class=corner></b><span>&#8250;</span><b class=corner></b></a > </div>
</div>
<b class=corner></b> </div>
</div>
<script type=text/javascript>
var d=yahoo.util.dom, e=yahoo.util.event;
kissy().use("*", function(s) {
var el = d.get('j_slide'),
activeindex = parseint(el.getattribute('data-active-index')) || 0;
var carousel = new s.carousel(el, {
hastriggers: false,
navcls: 'ks-switchable-nav',
contentcls: 'ks-switchable-content',
activetriggercls: 'current',
effect: "scrollx",
steps教程: 2,
viewsize: [680],
activeindex: activeindex
});
e.on('j_prev', 'click', carousel.prev, carousel, true);
e.on('j_next', 'click', carousel.next, carousel, true);
});
kissy().use("*", function(s) {
var el = d.get('j_shoppingguide');
if(!el){
return;
}
var activeindex = parseint(el.getattribute('data-active-index')) || 0;
var carousel = new s.carousel(el, {
navcls: 'ks-switchable-nav',
contentcls: 'ks-switchable-content',
activetriggercls: 'current',
effect: "scrollx",
steps: 4,
viewsize: [720],
activeindex: activeindex
});
e.on('j_shoppingguideprev', 'click', carousel.prev, carousel, true);
e.on('j_shoppingguidenext', 'click', carousel.next, carousel, true);
});
</script>
</div>
</body>
</html>