相思资源网 Design By www.200059.com
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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>焦点图</title>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js"><style type="text/css">*{margin:0; padding:0; list-style:none;}
.clear-fix{*zoom:1;}
.clear-fix:after{ content:"\0020"; clear:both; height:0; display:block;}
h1{ text-align:center;}
.slider{width:980px; height:365px; margin:0 auto; position:relative;}
.slider .img_box{width:980px; height:365px; overflow:hidden;}
.slider ul{width:100000px;}
.slider li{ width:980px; height:365px; float:left; background:#ccc; text-align:center; font-size:larger; line-height:365px;}
.slider .num_box{ position:absolute; bottom:10px; right:10px;}
.slider .num_box a{ width:10px; height:10px; background:#fff; border-radius:5px; display:inline-block;}
.slider .num_box a.c{ background:#C00;}</style>
</head>
<body>
<h1>鼠标经过圆点切换</h1>
<div class="slider">
<div class="img_box">
<ul class="clear-fix">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
<div class="num_box">
<a href="javascript:void(0)" class="c"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
</div>
</div>
<script type="text/javascript">//鼠标经过圆点的滚动:
var n=0;
function slider(n){
$("ul").animate({marginLeft:-n*980},1000);
$(".num_box a").removeClass("c").eq(n).addClass("c");
}
t=setInterval(function(){
n++;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000)
slider(n);
$(".num_box a").hover(function(){
clearInterval(t);
slider($(this).index());
},function(){
t=setInterval(function(){
n=$(".num_box a.c").index()+1;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000)
})</script>
</body>
</html>
2.自动轮播+鼠标点击圆点滚动+离开圆点自动轮播:
复制代码 代码如下:
<!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>焦点图1</title>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js"><style type="text/css">*{margin:0; padding:0; list-style:none;}
.clear-fix{*zoom:1;}
.clear-fix:after{ content:"\0020"; clear:both; height:0; display:block;}
h1{ text-align:center;}
.slider{width:980px; height:365px; margin:0 auto; position:relative;}
.slider .img_box{width:980px; height:365px; overflow:hidden;}
.slider ul{width:100000px;}
.slider li{ width:980px; height:365px; float:left; background:#ccc; text-align:center; font-size:larger; line-height:365px;}
.slider .num_box{ position:absolute; bottom:10px; right:10px;}
.slider .num_box a{ width:10px; height:10px; background:#fff; border-radius:5px; display:inline-block;}
.slider .num_box a.c{ background:#C00;}</style>
</head>
<body>
<h1>鼠标点击圆点切换</h1>
<div class="slider">
<div class="img_box">
<ul class="clear-fix">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
<div class="num_box">
<a href="javascript:void(0)" class="c"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
</div>
</div>
<script type="text/javascript">var n=0;
function slider(n){
$("ul").animate({marginLeft:-n*980},500);
$(".num_box a").removeClass("c").eq(n).addClass("c");
}
t=setInterval(function(){
n++;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000)
slider(n);
$(".num_box a").click(function(){
clearInterval(t);
slider($(this).index());
$(".num_box a").mouseout(function(){
clearInterval(t);
t=setInterval(function(){
n=$(".num_box a.c").index()+1;
n=n>=$(".num_box a").length?0:n;
slider(n)
},3000);
})
})</script>
</body>
</html>
3.自动轮播+点击上一个,下一个,圆点滚动+离开上一个,下一个,圆点自动轮播:
复制代码 代码如下:
<!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>焦点图2</title>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js"><style type="text/css">*{margin:0; padding:0; list-style:none;}
.clear-fix{*zoom:1;}
.clear-fix:after{ content:"\0020"; clear:both; height:0; display:block;}
h1{ text-align:center;}
.top{ width:980px; margin:0 auto; position:relative;}
.top input{ width:100px; position:absolute; top:10px;}
.top .prev{ left:0;}
.top .next{ position:absolute; right:0;}
.slider{width:980px; height:365px; margin:0 auto; position:relative;}
.slider .img_box{width:980px; height:365px; overflow:hidden;}
.slider ul{width:100000px;}
.slider li{ width:980px; height:365px; float:left; background:#ccc; text-align:center; font-size:larger; line-height:365px;}
.slider .num_box{ position:absolute; bottom:10px; right:10px;}
.slider .num_box a{ width:10px; height:10px; background:#fff; border-radius:5px; display:inline-block;}
.slider .num_box a.c{ background:#C00;}</style>
</head>
<body>
<div class="top">
<input type="button" value="上一张" class="prev" />
<h1>鼠标点击按钮切换</h1>
<input type="button" value="下一张" class="next" />
</div>
<div class="slider">
<div class="img_box">
<ul class="clear-fix">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
<div class="num_box">
<a href="javascript:void(0)" class="c"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
</div>
</div>
<script type="text/javascript">var n=0;
function slider(index){
$("ul").stop().animate({marginLeft:-index*980},1000);
$(".num_box a").removeClass("c").eq(index).addClass("c");
}
//自动播放:
t=setInterval(function(){
n++;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000);
//上一张:
$(".prev").click(function(){
clearInterval(t);
var index=$(".num_box a.c").index()-1;
index=index<0?$(".num_box a").length-1:index;
slider(index);
})
//下一张:
$(".next").click(function(){
clearInterval(t);
var index=$(".num_box a.c").index()+1;
index=index>=$(".num_box a").length?0:index;
slider(index);
})
//点击圆点向右滚动:
$(".num_box a").click(function(){
clearInterval(t);
var index=$(this).index();
slider(index);
})
//鼠标移出按钮和圆点:
$(".num_box a,.next,.prev").mouseout(function(){
clearInterval(t);
t=setInterval(function(){
m=$(".num_box a.c").index()+1;
m=m>=$(".num_box a").length?0:m;
slider(m);
},3000);
})</script>
</body>
</html>
复制代码 代码如下:
<!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>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js"><style type="text/css">*{margin:0; padding:0; list-style:none;}
.clear-fix{*zoom:1;}
.clear-fix:after{ content:"\0020"; clear:both; height:0; display:block;}
h1{ text-align:center;}
.slider{width:980px; height:365px; margin:0 auto; position:relative;}
.slider .img_box{width:980px; height:365px; overflow:hidden;}
.slider ul{width:100000px;}
.slider li{ width:980px; height:365px; float:left; background:#ccc; text-align:center; font-size:larger; line-height:365px;}
.slider .num_box{ position:absolute; bottom:10px; right:10px;}
.slider .num_box a{ width:10px; height:10px; background:#fff; border-radius:5px; display:inline-block;}
.slider .num_box a.c{ background:#C00;}</style>
</head>
<body>
<h1>鼠标经过圆点切换</h1>
<div class="slider">
<div class="img_box">
<ul class="clear-fix">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
<div class="num_box">
<a href="javascript:void(0)" class="c"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
</div>
</div>
<script type="text/javascript">//鼠标经过圆点的滚动:
var n=0;
function slider(n){
$("ul").animate({marginLeft:-n*980},1000);
$(".num_box a").removeClass("c").eq(n).addClass("c");
}
t=setInterval(function(){
n++;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000)
slider(n);
$(".num_box a").hover(function(){
clearInterval(t);
slider($(this).index());
},function(){
t=setInterval(function(){
n=$(".num_box a.c").index()+1;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000)
})</script>
</body>
</html>
2.自动轮播+鼠标点击圆点滚动+离开圆点自动轮播:
复制代码 代码如下:
<!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>焦点图1</title>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js"><style type="text/css">*{margin:0; padding:0; list-style:none;}
.clear-fix{*zoom:1;}
.clear-fix:after{ content:"\0020"; clear:both; height:0; display:block;}
h1{ text-align:center;}
.slider{width:980px; height:365px; margin:0 auto; position:relative;}
.slider .img_box{width:980px; height:365px; overflow:hidden;}
.slider ul{width:100000px;}
.slider li{ width:980px; height:365px; float:left; background:#ccc; text-align:center; font-size:larger; line-height:365px;}
.slider .num_box{ position:absolute; bottom:10px; right:10px;}
.slider .num_box a{ width:10px; height:10px; background:#fff; border-radius:5px; display:inline-block;}
.slider .num_box a.c{ background:#C00;}</style>
</head>
<body>
<h1>鼠标点击圆点切换</h1>
<div class="slider">
<div class="img_box">
<ul class="clear-fix">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
<div class="num_box">
<a href="javascript:void(0)" class="c"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
</div>
</div>
<script type="text/javascript">var n=0;
function slider(n){
$("ul").animate({marginLeft:-n*980},500);
$(".num_box a").removeClass("c").eq(n).addClass("c");
}
t=setInterval(function(){
n++;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000)
slider(n);
$(".num_box a").click(function(){
clearInterval(t);
slider($(this).index());
$(".num_box a").mouseout(function(){
clearInterval(t);
t=setInterval(function(){
n=$(".num_box a.c").index()+1;
n=n>=$(".num_box a").length?0:n;
slider(n)
},3000);
})
})</script>
</body>
</html>
3.自动轮播+点击上一个,下一个,圆点滚动+离开上一个,下一个,圆点自动轮播:
复制代码 代码如下:
<!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>焦点图2</title>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js"><style type="text/css">*{margin:0; padding:0; list-style:none;}
.clear-fix{*zoom:1;}
.clear-fix:after{ content:"\0020"; clear:both; height:0; display:block;}
h1{ text-align:center;}
.top{ width:980px; margin:0 auto; position:relative;}
.top input{ width:100px; position:absolute; top:10px;}
.top .prev{ left:0;}
.top .next{ position:absolute; right:0;}
.slider{width:980px; height:365px; margin:0 auto; position:relative;}
.slider .img_box{width:980px; height:365px; overflow:hidden;}
.slider ul{width:100000px;}
.slider li{ width:980px; height:365px; float:left; background:#ccc; text-align:center; font-size:larger; line-height:365px;}
.slider .num_box{ position:absolute; bottom:10px; right:10px;}
.slider .num_box a{ width:10px; height:10px; background:#fff; border-radius:5px; display:inline-block;}
.slider .num_box a.c{ background:#C00;}</style>
</head>
<body>
<div class="top">
<input type="button" value="上一张" class="prev" />
<h1>鼠标点击按钮切换</h1>
<input type="button" value="下一张" class="next" />
</div>
<div class="slider">
<div class="img_box">
<ul class="clear-fix">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
<div class="num_box">
<a href="javascript:void(0)" class="c"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
<a href="javascript:void(0)"></a>
</div>
</div>
<script type="text/javascript">var n=0;
function slider(index){
$("ul").stop().animate({marginLeft:-index*980},1000);
$(".num_box a").removeClass("c").eq(index).addClass("c");
}
//自动播放:
t=setInterval(function(){
n++;
n=n>=$(".num_box a").length?0:n;
slider(n);
},3000);
//上一张:
$(".prev").click(function(){
clearInterval(t);
var index=$(".num_box a.c").index()-1;
index=index<0?$(".num_box a").length-1:index;
slider(index);
})
//下一张:
$(".next").click(function(){
clearInterval(t);
var index=$(".num_box a.c").index()+1;
index=index>=$(".num_box a").length?0:index;
slider(index);
})
//点击圆点向右滚动:
$(".num_box a").click(function(){
clearInterval(t);
var index=$(this).index();
slider(index);
})
//鼠标移出按钮和圆点:
$(".num_box a,.next,.prev").mouseout(function(){
clearInterval(t);
t=setInterval(function(){
m=$(".num_box a.c").index()+1;
m=m>=$(".num_box a").length?0:m;
slider(m);
},3000);
})</script>
</body>
</html>
标签:
焦点图,轮播
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无3种不同方式的焦点图轮播特效分享的评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?