jQuery滚动图片特效,jQuery无缝(不连续)滚动图片代码
2012-06-23 09:33
501 查看
<!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=utf-8" />
<title>不连续滑动</title>
<meta name="author" content="ximan" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<style type="text/css">
*{margin:0;padding:0;}
img{border:none;}
#slide{overflow:hidden;width:900px;margin:100px auto;}
ul{list-style:none;width:2999px;}
li{float:left;}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
function AutoScroll(){
var _scroll = $("#slide>ul");
//ul往左边移动300px
_scroll.animate({marginLeft:"-300px"},1000,function(){
//把第一个li丢最后面去
_scroll.css({marginLeft:0}).find("li:first").appendTo(_scroll);
});
}
$(function(){
//两秒后调用
var _scrolling=setInterval("AutoScroll()",2000);
$("#slide>ul").hover(function(){
//鼠标移动DIV上停止
clearInterval(_scrolling);
},function(){
//离开继续调用
_scrolling=setInterval("AutoScroll()",2000);
});
});
</script>
</head>
<body>
<h1><a href="http://ons.me/" target="_blank" title="一个热爱网络的年轻人的博客">西门的后花园</a></h1>
<h2><a href="http://ons.me/299.html" target="_blank">jQuery滚动图片特效,jQuery无缝滚动图片代码</a></h2>
<div id="slide">
<ul>
<li><img src="1.jpg" /></li>
<li><img src="2.jpg" /></li>
<li><img src="3.jpg" /></li>
<li><img src="4.jpg" /></li>
<li><img src="5.jpg" /></li>
</ul>
</div>
</body>
</html>
摘自 http://ons.me/299.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>不连续滑动</title>
<meta name="author" content="ximan" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<style type="text/css">
*{margin:0;padding:0;}
img{border:none;}
#slide{overflow:hidden;width:900px;margin:100px auto;}
ul{list-style:none;width:2999px;}
li{float:left;}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
function AutoScroll(){
var _scroll = $("#slide>ul");
//ul往左边移动300px
_scroll.animate({marginLeft:"-300px"},1000,function(){
//把第一个li丢最后面去
_scroll.css({marginLeft:0}).find("li:first").appendTo(_scroll);
});
}
$(function(){
//两秒后调用
var _scrolling=setInterval("AutoScroll()",2000);
$("#slide>ul").hover(function(){
//鼠标移动DIV上停止
clearInterval(_scrolling);
},function(){
//离开继续调用
_scrolling=setInterval("AutoScroll()",2000);
});
});
</script>
</head>
<body>
<h1><a href="http://ons.me/" target="_blank" title="一个热爱网络的年轻人的博客">西门的后花园</a></h1>
<h2><a href="http://ons.me/299.html" target="_blank">jQuery滚动图片特效,jQuery无缝滚动图片代码</a></h2>
<div id="slide">
<ul>
<li><img src="1.jpg" /></li>
<li><img src="2.jpg" /></li>
<li><img src="3.jpg" /></li>
<li><img src="4.jpg" /></li>
<li><img src="5.jpg" /></li>
</ul>
</div>
</body>
</html>
摘自 http://ons.me/299.html
相关文章推荐
- jQuery滚动图片特效,jQuery无缝滚动图片代码
- js无缝图片滚动代码,利用强大的JQUERY,兼容IE、火狐等主流浏览器
- 非常平滑的JS图片滚动特效代码,无缝循环,速度可自定义,鼠标悬停时停止。它的特点是JS和图片地址分离,这样做你就经易的从数据库动态调用每张图片的地址,方便控制,因此它非常的应用。
- jquery图片无缝滚动代码左右上下无缝滚动图片
- jquery图片无缝滚动代码左右 上下无缝滚动图片
- jQuery动画效果实现图片无缝连续滚动
- jQuery动画效果实现图片无缝连续滚动
- jquery图片无缝滚动特效
- jQuery无缝滚动图片代码
- jQuery 间歇式无缝滚动特效分享(三张图片平行滚动)
- jQuery动画效果实现图片无缝连续滚动
- js实现图片向上连续滚动特效代码(含注释)
- jQuery 间歇式无缝滚动特效分享(三张图片平行滚动)
- jQuery 间歇式无缝滚动特效分享(三张图片平行滚动)
- JS特效之连续不断横向滚动图片代码
- jQuery动画效果实现图片无缝连续滚动
- 面向对象的无缝上下滚动图片特效代码
- jQuery插件实现文字无缝向上滚动效果代码
- 简单的鼠标滑动上去图片放大Jquery特效代码
- 图片连续循环滚动代码(向上、下、左、右)