图片列表带箭头上下无缝滚动展示特效

<!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>
<style type="text/css">
body,div,ul,li{margin:0;padding:0;}
body{background:#052D01;font:12px/1.5 arial;}
#box_wwwzzjs_net{position:relative;width:210px;height:700px;border:1px solid #5E8743;margin:20px;}
#box_wwwzzjs_net div{position:absolute;top:50%;left:50%;width:160px;height:570px;overflow:hidden;margin:-285px 0 0 -80px;}
#box_wwwzzjs_net .up,#box_wwwzzjs_net .down_zzjs__net{position:absolute;left:50%;width:48px;height:48px;z-index:10;cursor:pointer;overflow:hidden;margin-left:-24px;text-indent:-9999px;background:url(/img/20120606wwwzzjsnet_1.jpg) no-repeat;}
#box_wwwzzjs_net .up{top:10px;background-position:0 0;}
#box_wwwzzjs_net .down_zzjs__net{bottom:10px;background-position:0 bottom;}
#box_wwwzzjs_net ul{position:absolute;width:160px;}
#box_wwwzzjs_net li{width:160px;height:190px;list-style:none;text-align:center;}
#box_wwwzzjs_net a{color:#fff;font-weight:700;text-decoration:none;}
#box_wwwzzjs_net img{width:156px;height:156px;display:block;margin-bottom:5px;border:2px solid #ccc;}
</style>
<script type="text/javascript">
//获取id
function $ (id)
{
    return typeof id === "string" ? document.getElementById(id) : 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.length; 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;
        this.obj = $(obj);
        this.oUp = $$$("up", this.obj)[0];
        this.oDown = $$$("down_zzjs__net", this.obj)[0];
        this.oList = $$$("list_wwwzzjsnet", this.obj)[0];
        this.aItem = this.oList.children;
        this.timer = null;
        this.iHeight = this.aItem[0].offsetHeight;
        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 = 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"
        }, 30)
    }
};
window.onload = function ()
{
    new Roll("box_wwwzzjs_net");
};
</script>
</head>
<body>

<script type="text/javascript" src="http://www.zzjs.net/ad/tc.js"></script>
<div id="box_wwwzzjs_net">
    <span class="up">up</span>
    <span class="down_zzjs__net">down</span>
    <div>
        <ul class="list_wwwzzjsnet">
            <li><a href="javascript:;"><img src="/img/20120606wwwzzjsnet_2.jpg" />站长特效一号图片</a></li>
            <li><a href="javascript:;"><img src="/img/20120606wwwzzjsnet_3.jpg" />站长特效二号图片</a></li>
            <li><a href="javascript:;"><img src="/img/20120606wwwzzjsnet_4.jpg" />站长特效三号图片</a></li>
            <li><a href="javascript:;"><img src="/img/20120606wwwzzjsnet_5.jpg" />站长特效四号图片</a></li>
            <li><a href="javascript:;"><img src="/img/20120606wwwzzjsnet_6.jpg" />站长特效五号图片</a></li>
        </ul>
    </div>
</div>
</body>
</html>
时间: 2024-08-08 01:29:44

图片列表带箭头上下无缝滚动展示特效的相关文章

原生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" lang="en"> <head> <title>d

jQuery文字和图片列表滚动插件

这是一款可以使任何文字和图片列表进行水平和垂直滚动的jQuery插件.该jquery列表滚动插件可以使用任何列表.任何尺寸和任何内容.它可以设置水平和垂直滚动,自动滚动和无限循环滚动,非常适用于滚动新闻的制作. 该jQuery文字图片滚动插件的特点和一些注意事项如下: 使用非常简单. 可以在任何形式的列表. 列表中的元素可以是文字.图片等等. 列表中的元素不能是固定定位,或者是相同的元素. 列表元素可以水平或垂直滚动. 可以使列表简单滚动或无限循环滚动. 可以手动滚动列表,也可是设置为自动滚动.

15款fullpage.js鼠标滚动页面动画展示特效

jquery全屏鼠标滚动切换fullpage页面模板下载 html5响应式页面滚动背景图片动画特效 酷炫html5 css3全屏滚动动画专题模板 html5腾讯互动娱乐网站鼠标滚动展示模板 html5平安儿童手表页面滚动简约单页模板 html5叮咚手机app下载页面滚动展示特效 jquery fullPage证券股票软件页面滚屏动画特效 jquery.fullpage.js360安全路由全屏页面滚动效果 html5新年快乐医院专题页介绍模板下载 html5雷锋wifi软件介绍页面下滑滚动式特效

带箭头左右滚动图片

<div class="rollBox"> <div class="LeftBotton" onmousedown="ISL_GoUp()" onmouseup="ISL_StopUp()" onmouseout="ISL_StopUp()"></div> <div class="Cont" id="ISL_Cont">

兼容IE7以上的无缝滚动,带箭头、停顿

<!DOCTYPE HTML><html> <head>        <meta charset="utf-8" />        <title>无缝滚动</title>        <link href="">    </head>    <style>        * {            padding: 0;            marg

Javascript图片无缝滚动

js无缝滚动效果几乎在任何网页上都能看到它的身影,有的可能是使用插件,其实使用原始的javascript比较简单. 主要的是使用js位置知识. 1.innerHTML:设置或获取元素的html标签 2.scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距 3.offsetWidth:设置或获取指定标签的宽度 4.setInterval():设置方法定时启动 5.clearInterval();清除定时器 效果图: 先睹为快:demo <!DOCTYPE html>

javascript实现图片无缝滚动(scrollLeft的使用方法介绍)

<!DOCTYPE html > <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <style> .piczhanshi{width:976px;height:167px;border:1px #999999 solid;

SuperSlidev2.1 轮播图片和无缝滚动

SuperSlidev2.1 轮播图片和无缝滚动 使用方法点击链接:http://down.admin5.com/demo/code_pop/18/562/index.html 简单使用方法如下 html <div class="bd"><ul><li _src="url(images/1.jpg)" style="background:#E2025E center 0 no-repeat;"><a hr

JavaScript----marquee滚动标签 图片无缝滚动 插入百度地图

页面的自动滚动效果,可由javascript来实现, 但是有一个html标签 - <marquee></marquee>可以实现多种滚动效果,无需js控制. 使用marquee标记不仅可以移动文字,也可以移动图片,表格等. 语法:<marquee>...</marquee>: 说明:在标记之间添加要进行滚动的内容. 重要属性: 1.滚动方向direction(包括4个值:up. down. left和 right) 语法:<marquee direct