上下左右滚动截图截图怎么做

教你如何下载淘宝主图原图的方法_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
教你如何下载淘宝主图原图的方法
上传于||文档简介
&&教​你​如​何​下​载​淘​宝​主​图​原​图​的​方​法
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
下载文档到电脑,查找使用更方便
还剩2页未读,继续阅读
你可能喜欢箭头上下控制、无缝的,图片上下滚动代码_最火下载站
您的位置: >
> 箭头上下控制、无缝的,图片上下滚动代码
箭头上下控制、无缝的,图片上下滚动代码
  基于JavaScript的图片上下无缝滚动,带控制按钮,做的比较精致,兼容性方面,兼容IE全系列和火狐等主流浏览器。编写实现采用面向对象的原理,参考价值大。
  示例:
&!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&&
&meta http-equiv=&Content-Type& content=&text/ charset=utf-8& /&
&title&无缝滚动&/title&
&style type=&text/css&&
body,div,ul,li{margin:0;padding:0;}
body{background:#052D01;font:12px/1.5}
#box{position:width:210height:700border:1px solid #5E8743;margin:20}
#box div{position:top:50%;left:50%;width:160height:570overflow:margin:-285px 0 0 -80}
#box .up,#box .down{position:left:50%;width:48height:48z-index:10;cursor:overflow:margin-left:-24text-indent:-9999background:url(/uploads/allimg/1108/arrow.jpg) no-}
#box .up{top:10background-position:0 0;}
#box .down{bottom:10background-position:0}
#box ul{position:width:160}
#box li{width:160height:190list-style:text-align:}
#box a{color:#font-weight:700;text-decoration:}
#box img{width:156height:156display:margin-bottom:5border:2px solid #}
&script type=&text/javascript&&
function $ (id)
return typeof id === &string& ? document.getElementById(id) :
//获取tagName
function $$ (elem, oParent)
return (oParent || document).getElementsByTagName(elem);
//获取class
function $$$ (className, oParent)
var aClass = [];
var reClass = new RegExp(&(//s|^)& + className + &($|//s)&);
var aElem = $$(&*&, oParent);
for (var i = 0; i & aElem. i++) reClass.test(aElem[i].className) && aClass.push(aElem[i]);
return aClass
//初始化对象
function Roll ()
this.initialize.apply(this, arguments)
Roll.prototype =
initialize: function (obj)
var _this =
this.obj = $(obj);
this.oUp = $$$(&up&, this.obj)[0];
this.oDown = $$$(&down&, this.obj)[0];
this.oList = $$$(&list&, this.obj)[0];
this.aItem = this.oList.
this.timer =
this.iNow = 0;
this.iHeight = this.aItem[0].offsetH
this.oUp.onclick = function ()
_this.up()
this.oDown.onclick = function ()
_this.down()
up: function ()
this.oList.insertBefore(this.aItem[this.aItem.length - 1], this.oList.firstChild);
this.oList.style.top = -this.iHeight + &px&;
this.doMove(0)
down: function ()
this.doMove(-this.iHeight, function ()
this.oList.appendChild(this.aItem[0]);
this.oList.style.top = 0;
doMove: function (iTarget, callBack)
var _this =
clearInterval(this.timer)
this.timer = setInterval(function ()
var iSpeed = (iTarget - _this.oList.offsetTop) / 5;
iSpeed = iSpeed & 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);
_this.oList.offsetTop == iTarget ? (clearInterval(_this.timer), callBack && callBack.apply(_this)) : _this.oList.style.top = iSpeed + _this.oList.offsetTop + &px&
window.onload = function ()
new Roll(&box&);
&div id=&box&&
&span class=&up&&up&/span&
&span class=&down&&down&/span&
&ul class=&list&&
&li&&a href=&javascript:;&&&img src=&/uploads/common/images/s_p1.jpg& /&Ozolio - Webcam Hosting&/a&&/li&
&li&&a href=&javascript:;&&&img src=&/uploads/common/images/s_p2.jpg& /&Sullivan Construction Inc.&/a&&/li&
&li&&a href=&javascript:;&&&img src=&/uploads/common/images/s_p3.jpg& /&Maui Stables&/a&&/li&
&li&&a href=&javascript:;&&&img src=&/uploads/common/images/s_p4.jpg& /&Code Rebel 3.0&/a&&/li&
&li&&a href=&javascript:;&&&img src=&/uploads/common/images/s_p5.jpg& /&SecurityPro Shop&/a&&/li&
&/html& &br /&&center&如不能显示效果,请按Ctrl+F5刷新本页,更多网页代码:&a href='/' target='_blank'&/&/a&&/center&提示:可修改后代码再运行!
上一篇: 下一篇:

我要回帖

更多关于 全程上下截图 的文章

 

随机推荐