PBA官网首页jQuery焦点图轮播滚动切换特效代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 PBA官网首页jQuery焦点图轮播滚动切换特效代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

PBA官网首页jQuery焦点图轮播滚动切换特效代码

HTML代码(index.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>
<title>PBA官网首页jQuery焦点图</title>
<link href="css/framework.css" rel="stylesheet" />
<link href="css/stylenewss.css" rel="stylesheet" type="text/css">
<link href="css/fashionfoucs_lrtk.css" rel="stylesheet" />
<script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="js/jquery.plugin.min.js" type="text/javascript"></script>
</head>
<body style="background:#f6f6f6;">
<br>
<br>
<br>
<div style="margin: 0px auto; width:1200px; padding:0px; ">
	<div class="lit">
		<p><a href="#/" >
		<img src="images/1top_pic1.jpg" border="0" /></a></p>
		<p style="margin-top:2px;"><a href="/cty.html" >
		<img src="images/2top_pic2.jpg" border="0" /></a></p>
		<p style="margin-top:2px;">
		<a href="http://www.pba.cn/xznt" >
		<img src="images/3top_pic3.jpg" border="0" /></a></p>
	</div>
</div>
<div id="banner">
	<ul id="banner_img">
		<li class="item1"><a href="#/" >
		<div class="wrapper">
		</div>
		</a></li>
		<li class="item2"><a href="#/" >
		<div class="wrapper">
		</div>
		</a></li>
		<li class="item3">
		<a href="#/" >
		<div class="wrapper">
		</div>
		</a></li>
		<li class="item4"><a href="#/" >
		<div class="wrapper">
		</div>
		</a></li>
		<li class="item6"><a href="#/" >
		<div class="wrapper">
		</div>
		</a></li>
	</ul>
	<div id="banner_ctr">
		<div id="drag_ctr">
		</div>
		<ul>
			<li style="width:0px;"></li>
			<li class="styclsa">
			<a href="#/"  class="astysa">BB家族首发</a></li>
			<li style="width:1px;"></li>
			<li class="styclsa"><a href="#/"  class="astysa">
			超值礼包</a></li>
			<li style="width:1px;"></li>
			<li class="styclsa">
			<a href="#/"  class="astysa">红包提前换</a></li>
			<li style="width:1px;"></li>
			<li class="styclsa"><a href="#/"  class="astysa">
			美妆特卖</a></li>
			<li style="width:1px;"></li>
			<li class="styclsa"><a href="#/"  class="astysa">
			PBA 9周年</a></li>
		</ul>
	</div>
</div>
<script type="text/javascript" src="js/fashionfoucs.js"></script>
</body>
</html>

JS代码(fashionfoucs.js):

var curIndex = 0;
	var time = 800;
	var slideTime = 6000;
	var adTxt = $("#banner_img>li>div>.ad_txt");
	var adImg = $("#banner_img>li>div>.ad_img");
	var int = setInterval("autoSlide()",slideTime);
	$("#banner_ctr>ul>li[class!='first-item'][class!='last-item']").mouseover(function (){
	var ct=$(this).index("#banner_ctr>ul>li[class!='first-item'][class!='last-item']");
	if(ct==1 || ct==0){
	ct=0;
}
if(ct==2 || ct==3){
	ct=1;
}
if(ct==5 || ct==4){
	ct=2;
}
if(ct==6 || ct==7){
	ct=3;
}
if(ct==8 || ct==9){
	ct=4;
}
if(ct<0){
	ct=0;
}
show(ct);
	window.clearInterval(int);
	int = setInterval("autoSlide(1)",slideTime);
}
);
	function autoSlide(ct){
	curIndex + 1 >= 5? curIndex = -1:0;
	show(curIndex + 1);
}
function show(index){
	$.easing.def = "easeOutQuad";
	$("#drag_ctr").stop(false,true).animate({
	left:index * 120 + 0}
,time);
	$("#banner_img>li").eq(curIndex).stop(false,true).fadeOut(time);
	adTxt.eq(curIndex).stop(false,true).animate({
	top:"340px"}
,time);
	adImg.eq(curIndex).stop(false,true).animate({
	right:"700px"}
,time);
	setTimeout(function (){
	$("#banner_img>li").eq(index).stop(false,true).fadeIn(time);
	adTxt.eq(index).children("p").css({
	paddingTop:"50px",paddingBottom:"50px"}
).stop(false,true).animate({
	paddingTop:"0",paddingBottom:"0"}
,time);
	adTxt.eq(index).css({
	top:"0",opacity:"0"}
).stop(false,true).animate({
	top:"170px",opacity:"1"}
,time);
	adImg.eq(index).css({
	right:"700px",opacity:"0"}
).stop(false,true).animate({
	right:"500px",opacity:"1"}
,time);
}
,200) curIndex = index;
}

CSS代码(fashionfoucs_lrtk.css):

@charset "UTF-8";.wrapper{width:986px;margin:0 auto;position:relative;height:390px;}
#banner{width:100%;height:390px;background:#000;overflow:hidden;position:relative;}
#banner_img{display:block;position:relative;}
#banner_img li{position:absolute;top:0;left:0;width:100%;background-position:center;background-size:cover;display:none;}
/*设置背景图片-------开始*/
 #banner_img li.item1{background-image:url(1lunbo1.jpg);display:block;}
#banner_img li.item2{background-image:url(2lunbo2.jpg);}
#banner_img li.item3{background-image:url(3lunbo3.jpg);}
#banner_img li.item4{background-image:url(1hnav1.jpg);}
#banner_img li.item6{background-image:url(jiuzhou1920x390-9.jpg);}
/*设置背景图片--------结束*/
 #banner_img .ad_img{position:absolute;right:10px;top:80px;width:506px;height:404px;}
#banner_img .ad_txt{position:absolute;left:10px;top:170px;color:#fff;text-shadow:1px 1px rgba(51,51,51,0.3);}
#banner_img .ad_txt h2{font:bold 36px/60px Microsoft YaHei;}
#banner_img .ad_txt a{display:block;width:100px;height:25px;line-height:25px;text-align:center;margin-top:10px;background:#fff;color:#666;}
#banner_ctr{position:absolute;width:960px;height:122px;margin-left:-90px;left:35%;bottom:-75px;z-index:1;}
#banner_ctr ul{width:100%;}
#banner_ctr li{float:left;display:inline-block;height:27px;text-align:center;vertical-align:middle;cursor:pointer;}
.styclsa{line-height:27px;background:url(kk.png) no-repeat;height:27px;color:#ffffff;font-size:12.48px;padding:0px 0px 0 0px;width:119px;margin:0 auto;overflow:hidden;font-family:"宋体";zoom:1;}
.astysa{color:#ffffff;font-size:12.48px;text-align:center;}
#drag_ctr{position:absolute;top:-5px;cursor:pointer;left:0px;width:119px;height:32px;bottom:120px;background:url(kk1.png) no-repeat;padding:0px 0px 0 0px;margin:0 auto;overflow:hidden;color:#fff;filter:alpha(opacity=50);color:#ffffff;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
709.97 KB
Html 焦点滚动特效2
最新结算
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
HTML5实现CSS滤镜图片切换特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery+css3实现信封效果
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章