求一个JS特效,图片左右滚动 点击左右的箭头可以滚动一条的,

JavaScript019

求一个JS特效,图片左右滚动 点击左右的箭头可以滚动一条的,,第1张

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

<title>无标题页</title>

<script type="text/javascript" src="http://www.suqian.cm/js/ScrollPic.js"></script>

</head>

<body>

<style type="text/css">

.pic_top div{float:left}

.pic_yi{height:80pxwidth:80pxpadding:20px}

</style>

<div class="pic_top">

<div class="pic_left" id="LeftArr" style="height:100pxwidth:200px">鼠标点击向左(left)滚动</div>

<div class="pic_center" id="divAcrollPic1" style=" height:100pxwidth:400pxoverflow:hidden">

<div class="pic_yi">图片</div>

<div class="pic_yi">图片</div>

<div class="pic_yi">图片</div>

<div class="pic_yi">图片</div>

</div>

<div class="pic_right" id="RightArr" style="height:100pxwidth:200px">鼠标点击向右(right)滚动</div>

</div>

<script type="text/javascript">

// 左右点击滚动开始

var scrollPic1 = new ScrollPic()

scrollPic1.scrollContId = "divAcrollPic1"//内容容器ID

scrollPic1.arrLeftId = "LeftArr"//左箭头ID

scrollPic1.arrRightId = "RightArr"//右箭头ID

scrollPic1.frameWidth = 400//显示框宽度

scrollPic1.pageWidth = 100//翻页宽度

scrollPic1.speed = 10//移动速度(单位毫秒,越小越快)

scrollPic1.space = 10//每次移动像素(单位px,越大越快)

scrollPic1.autoPlay = false//自动播放

scrollPic1.autoPlayTime = 3//自动播放间隔时间(秒)

scrollPic1.initialize()//初始化

// 左右点击滚动结束

</script>

</body>

</html>

函数

描述

$(selector).hide()

隐藏被选元素

$(selector).show()

显示被选元素

$(selector).toggle()

切换(在隐藏与显示之间)被选元素

$(selector).slideDown()

向下滑动(显示)被选元素

$(selector).slideUp()

向上滑动(隐藏)被选元素

$(selector).slideToggle()

对被选元素切换向上滑动和向下滑动

$(selector).fadeIn()

淡入被选元素

$(selector).fadeOut()

淡出被选元素

$(selector).fadeTo()

把被选元素淡出为给定的不透明度

$(selector).animate()

对被选元素执行自定义动画

speed

参数规定显示或隐藏的速度。可以设置这些值:"slow",

"fast",

"normal"

或毫秒。

callback

参数是在

hide

show

函数完成之后被执行的函数名称

自己整理,绝非抄袭!