jQ海尔官网全屏焦点图轮播滚动切换特效代码

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

以下是 jQ海尔官网全屏焦点图轮播滚动切换特效代码 的示例演示效果:

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

部分效果截图:

jQ海尔官网全屏焦点图轮播滚动切换特效代码

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>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title>jQuery海尔官网全屏焦点图</title>
<link href="css/lanrenzhijia.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="js/lanrenzhijia.js"></script>
</head>
<body>
<div class="nf_width_lanrenzhijia">
  <div class="nf_lanrenzhijia"></div>
  <div class="main_content">
    <div class="nf_hp_kv js_nf_hp_kv">
      <div class="window js_window">
        <div class="kv_item" data-bg='images/P020130221595131323879.jpg'><a href='#'><img src='images/P020130221696603388676.jpg' /></a></div>
        <div class="kv_item" data-bg='images/P020130528333000460462.jpg'><a href='#'><img src='images/P020130528332914508514.jpg' /></a></div>
        <div class="kv_item" data-bg='images/P020130422607486443692.jpg'><a href='#/'><img src='images/P020130422604104730736.jpg' /></a></div>
        <div class="kv_item" data-bg='images/P020130409512471312015.jpg'><a href='#/'><img src='images/P020130409512243829643.jpg' /></a></div>
        <div class="kv_item" data-bg='images/P020130422644313479005.jpg'><a href='#/'><img src='images/P020130422644268305570.jpg' /></a></div>
      </div>
      <ul class="nav js_nav">
      </ul>
      <div class="btn_prev js_btn_prev"><a href="javascript:;">Prev</a></div>
      <div class="btn_next js_btn_next"><a href="javascript:;">Next</a></div>
    </div>
    <div class="nf_hp_teaser_c3x js_nf_hp_teaser_c3x">
      <div class="t_l js_t_group">
        <div class="t_item"><a href='#/'><img src='images/P020130422620707571884.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a href='#/'><img src='images/P020130516546999560591.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a href='#/'><img src='images/P020130506718680739253.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a href='#/'><img src='images/P020130427492466130429.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a href='#/'><img src='images/P020130516546999560591.jpg' width="332" height="168" /></a></div>
      </div>
      <div class="t_m js_t_group">
        <div class="t_item"><a  href='#/'><img src='images/P020130402377427918407.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a href='#/'><img src='images/P020130427492466130429.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a  href='#/'><img src='images/P020130313527277055795.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a  href='#/'><img src='images/P020130422620707571884.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a  href='#/'><img src='images/P020130416484359909480.jpg' width="332" height="168" /></a></div>
      </div>
      <div class="t_r js_t_group">
        <div class="t_item"><a href='#/'><img src='images/P020130525522926499063.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a  href='#/'><img src='images/P020130422620707571884.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a href='#/'><img src='images/P020130525389894008073.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a href='#/'><img src='images/P020130516546999560591.jpg' width="332" height="168" /></a></div>
        <div class="t_item"><a  href='#/'><img src='images/P020130402377427918407.jpg' width="332" height="168" /></a></div>
      </div>
    </div>
  </div>
</div>
</body>
</html>

JS代码(lanrenzhijia.js):

jQuery(function(){
	//init kv and teasers(function(){
	var $kv = jQuery('.js_nf_hp_kv')var $kv_window = $kv.find('.js_window');
	var $kv_items = $kv.find('.kv_item')var $kv_nav = $kv.find('.js_nav');
	var $kv_prev = $kv.find('.js_btn_prev');
	var $kv_next = $kv.find('.js_btn_next');
	var kv_items_count = $kv_items.length;
	var $ts = jQuery('.js_nf_hp_teaser_c3x')var $ts_groups = $ts.find('.js_t_group');
	var animate_dur = 500;
	var play_dur = 5000;
	var stop_flag = false;
	var $window = jQuery(window);
	var cur_idx = 0;
	$kv_items.hide();
	$ts_groups.find('.t_item').hide();
	var goto = function( idx ){
	cur_idx = idx;
	//idx from 0var $kv_visible = $kv_items.filter(':visible');
	if ( $kv_visible.length ){
	$kv_visible.fadeOut(animate_dur);
	$kv_items.eq(idx).fadeIn(animate_dur);
}
else{
	$kv_items.eq(idx).show();
}
$ts_groups.each(function(g_idx){
	var $ts_group = jQuery(this);
	var $ts_items = $ts_group.find('.t_item');
	var $ts_visible = $ts_items.filter(':visible');
	if ( $ts_visible.length ){
	$ts_visible.css({
	'z-index':99}
);
	window.setTimeout(function(){
	$ts_items.eq(idx).css({
	'top':'158px','z-index':100}
).show().animate({
	'top':0}
,animate_dur,function(){
	$ts_visible.hide();
}
);
}
,80*g_idx );
}
else{
	$ts_items.eq(idx).show();
}
}
);
	$kv_nav.find('li').eq(idx).addClass('active').siblings().removeClass('active');
}
//init $kv_prev $kv_next$kv_prev.click(function(){
	var next_idx = cur_idx - 1;
	if ( next_idx < 0 ){
	next_idx = kv_items_count - 1;
}
goto( next_idx );
}
);
	$kv_next.click(function(){
	var next_idx = cur_idx + 1;
	if ( next_idx >= kv_items_count ){
	next_idx = 0;
}
goto( next_idx );
}
);
	//init $navfor ( var i=0;
	i<kv_items_count;
	i++ ){
	var $li = jQuery('<li><a href="javascript:;
	">'+ ( i+1 ) +'</a></li>');
	(function(){
	var cur_idx = i;
	$li.click(function(){
	goto(cur_idx);
}
);
}
)();
	$kv_nav.append($li);
}
$kv_nav.css('margin-left',-(kv_items_count*10));
	//init kv_item$kv_items.each(function(){
	var $this_kv_item = jQuery(this);
	var this_bg = $this_kv_item.data('bg');
	$this_kv_item.css('background-image','url('+this_bg+')');
}
);
	//init btn_navvar repos_btn_nav = function(){
	var offset = $kv.offset();
	$kv_prev.css( 'left',-offset.left );
	$kv_next.css( 'right',-offset.left );
}
$window.resize(function(){
	repos_btn_nav();
}
);
	$kv.hover(function(){
	stop_flag = true;
}
,function(){
	stop_flag = false;
}
);
	$ts.hover(function(){
	stop_flag = true;
}
,function(){
	stop_flag = false;
}
);
	window.setInterval(function(){
	if ( !stop_flag ){
	$kv_next.click();
}
}
,play_dur);
	repos_btn_nav();
	goto(cur_idx);
}
)();
	/* js_nf_ts_dot_tab */
jQuery('.js_nf_ts_dot_tab').each(function(){
	var $_root = jQuery(this);
	var $tabs = $_root.find('.js_dt_tabs > a');
	var $contents = $_root.find('.js_dt_contents .dt_content').hide();
	$tabs.each(function(idx){
	var $this_tab = jQuery(this);
	var $this_content = $contents.eq(idx);
	$this_tab.click(function(){
	$this_content.show().siblings().hide();
	$this_tab.addClass('active').siblings().removeClass('active');
}
);
}
).eq(0).click();
}
);
	/* js_nf_ts_text_tab */
jQuery('.js_nf_ts_text_tab').each(function(){
	var $_root = jQuery(this);
	var $tabs = $_root.find('.js_tt_tabs > a');
	var $contents = $_root.find('.js_tt_contents .tt_content').hide();
	$tabs.each(function(idx){
	var $this_tab = jQuery(this);
	var $this_content = $contents.eq(idx);
	$this_tab.click(function(){
	$this_content.show().siblings().hide();
	$this_tab.addClass('active').siblings().removeClass('active');
}
);
}
).eq(0).click();
}
);
}
)

CSS代码(lanrenzhijia.css):

@charset "utf-8";*{margin:0;padding:0;}
body,button,input,select,textarea,label{font:12px/1.5 tahoma,arial,\5b8b\4f53,sans-serif;-webkit-text-size-adjust:none;/* fix Chrome 12 px limit */
color:#606060;}
img{border:none;}
body{background-image:url(../images/nf_header_bg.png);background-repeat:repeat-x;background-position:0 0;background-color:#EAEAEC;}
.nf_width_lanrenzhijia{width:100%;overflow:hidden;min-width:1000px;zoom:1;position:relative;}
.nf_lanrenzhijia{width:1000px;height:107px;margin:0 auto;position:relative;z-index:1010;}
.main_content{width:1000px;margin:0 auto;position:relative;zoom:1;min-height:400px;_height:400px;}
/* 主视觉 */
.nf_hp_kv{width:2000px;height:456px;margin:0 -500px;position:relative;}
.nf_hp_kv .window{width:2000px;height:456px;overflow:hidden;position:relative;}
.nf_hp_kv .window .kv_item{width:1000px;height:456px;overflow:hidden;position:absolute;padding:0 500px;}
.nf_hp_kv .nav{position:absolute;height:20px;left:50%;top:320px;}
.nf_hp_kv .nav li{width:20px;height:20px;float:left;display:inline;}
.nf_hp_kv .nav li a{width:20px;height:0px;padding-top:20px;float:left;display:inline;background-image:url(../images/nf_hp_kv_dot.png);_background-image:url(../images/nf_hp_kv_dot_ie6.png);background-repeat:no-repeat;background-position:0 0;overflow:hidden;}
.nf_hp_kv .nav li.active a,.nf_hp_kv .nav li a:hover{background-position:-20px 0;}
.nf_hp_kv .btn_prev,.nf_hp_kv .btn_next{width:32px;height:78px;position:absolute;top:110px;box-shadow:0 0 5px #666;overflow:hidden;}
.nf_hp_kv .btn_prev{left:0;border-top-right-radius:5px;border-bottom-right-radius:5px;}
.nf_hp_kv .btn_next{right:0;border-top-left-radius:5px;border-bottom-left-radius:5px;}
.nf_hp_kv .btn_prev a,.nf_hp_kv .btn_next a{width:32px;height:0;padding-top:78px;overflow:hidden;display:block;background-image:url(../images/nf_hp_kv_btn_nav.png);}
.nf_hp_kv .btn_prev a{background-position:0 0;}
.nf_hp_kv .btn_next a{background-position:right 0;}
.nf_hp_kv .btn_prev a:hover,.nf_hp_kv .btn_next a:hover{opacity:0.8;}
.nf_hp_kv .btn_prev a:hover{}
.nf_hp_kv .btn_next a:hover{}
/* 3个teaser */
.nf_hp_teaser_c3x{width:998px;height:168px;position:relative;margin-top:-110px;background-color:#fff;}
.nf_hp_teaser_c3x .t_l,.nf_hp_teaser_c3x .t_m,.nf_hp_teaser_c3x .t_r{width:332px;height:168px;overflow:hidden;float:left;display:inline;padding-right:1px;position:relative;}
.nf_hp_teaser_c3x .t_l{}
.nf_hp_teaser_c3x .t_m{}
.nf_hp_teaser_c3x .t_r{background-image:none;padding-right:0;}
.nf_hp_teaser_c3x .t_item{width:332px;height:168px;overflow:hidden;position:absolute;left:0;top:0;background-color:#fff;}
.nf_hp_teaser_c3x .t_item .event_layer{}
.nf_hp_teaser_c3x .t_item .event_layer h2{position:absolute;left:20px;top:16px;font-size:14px;color:#303030;font-weight:700;}
.nf_hp_teaser_c3x .t_item .event_layer p{position:absolute;left:20px;top:40px;color:#5f5f5f;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
962.53 KB
Html 焦点滚动特效1
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章