帮助中心
获取牛币
联系我们
关于我们
版权声明
素材牛首页
微博登录
QQ登录
微信扫码登录
注册
登录
新浪微博
QQ登陆
微信登录
热门搜索:
小程序
支付
Java
后台模板
上传
商城模板
jQuery
手机
Thinkphp
微信
Vue.js
首 页
网页特效
整站源码
PHP实例
网站模版
工具箱
常用代码
论坛
游戏源码
资源分享
当前位置:
首页
»
精选常用代码
» 带缩略图全屏切换幻灯实例
带缩略图全屏切换幻灯实例
浏览:610次
-
评论:0次
-
发布时间:2018-11-15
Html
Css
Js
/*首页焦点图*/ .wrap { width:1003px; position:relative; margin:0px auto; } .wrap1200 { width:1200px; position:relative; margin:0px auto; } .main { min-width:1003px; margin:0px auto; overflow:hidden; position:relative; } #banner { display:block; width:100%; height:500px; position:relative; } .piclink_box { width:1920px; height:500px; background:#000000; position:relative; margin-left:-450px; top:0; z-index:10; } .piclink_pic { position:relative; } .piclink_pic a { position:absolute; left:0px; top:0px; width:100%; display:none; } .piclink_pic a img { width:100%; } .piclink_focus { position:absolute; z-index:2; text-align:right; width:100%; bottom:0px; left:0px; height:105px; background:url(fade.png); text-align:center; } .piclink_focus a { display:inline-block; width:130px; height:80px; margin-top:12px; margin:9px 3px 3px 3px; } .piclink_focus a img { width:130px; height:80px; } .piclink_focus a:hover,.piclink_focus a.active { width:130px; height:80px; border:3px solid white; margin:9px 0px 0px 0px; } .piclink_btn { position:absolute; z-index:10; width:100%; } .piclink_btn a { display:inline-block; width:47px; height:87px; background:blue url(zh_ban_jt.png) 0px 0px no-repeat; position:absolute; z-index:2; } .piclink_btn .piclink_prev_btn { display:inline-block; width:47px; height:87px; background:url(zh_ban_jt.png) 0px 0px no-repeat; position:absolute; z-index:2; left:1%; top:-420px; } .piclink_btn .piclink_next_btn { display:inline-block; width:47px; height:87px; background:url(zh_ban_jt.png) -90px 0px no-repeat; position:absolute; z-index:2; right:1%; top:-420px; } .piclink_btn a:hover { opacity:0.7; filter:alpha(opacity=70); }
// 首页焦点图 for (var i = 0; i < $(".piclink_pic").length; i++) { fnFocusPic(i); }; function fnFocusPic(iNum) { var aIcon = $(".piclink_focus").eq(iNum).find("a"), aPic = $(".piclink_pic").eq(iNum).find("a"), iThis = 0, oPre = $(".piclink_prev_btn"), oNext = $(".piclink_next_btn"), oL = $(".piclink_pic a").length - 1, timer = null; oPre.click(function() { if (iThis > 0) { iThis--; } else { iThis = oL; } fnPic(); }); oNext.click(function() { if (iThis < oL) { iThis++; } else { iThis = 0; } fnPic(); }); oPre.hover(function() { clearInterval(timer); }, function() { timer = setInterval(function() { if (iThis < $(".piclink_focus").eq(iNum).find("a").length - 1) { iThis++; } else { iThis = 0; } fnPic(); }, 3000); }); oNext.hover(function() { clearInterval(timer); }, function() { timer = setInterval(function() { if (iThis < $(".piclink_focus").eq(iNum).find("a").length - 1) { iThis++; } else { iThis = 0; } fnPic(); }, 3000); }); aIcon.hover(function() { if (timer) { clearInterval(timer); } iThis = $(this).index(); fnPic(); }, function() { timer = setInterval(function() { if (iThis < $(".piclink_focus").eq(iNum).find("a").length - 1) { iThis++; } else { iThis = 0; } fnPic(); }, 3000); }); timer = setInterval(function() { if (iThis < $(".piclink_focus").eq(iNum).find("a").length - 1) { iThis++; } else { iThis = 0; } fnPic(); }, 3000); function fnPic() { aIcon.eq(iThis).addClass("active").siblings().removeClass("active"); aPic.eq(iThis).stop(true, true).fadeIn().siblings().stop(true, true).fadeOut(); } };
↑上面代码改变,会自动显示代码结果
jQuery调用版本:
1.6.4
<!doctype html><html><head><meta charset="utf-8"><title>带缩略图全屏切换幻灯实例-www.sucainiu.com</title><script src="https://libs.baidu.com/jquery/1.6.4/jquery.min.js"></script><style>
</style></head><body>
<script>
</script>
</body></html>
立即下载
收藏
积分说明:注册即送10牛币,每日签到可获得5牛币,成为VIP会员可永久免牛币下载!
充值积分
充值会员
更多说明»
代码描述:带缩略图全屏切换幻灯实例
带吸边效果的drag自由拖拽
纯CSS弹出菜单效果
讨论这个常用代码(0)
回答他人问题或分享心得会奖励牛币
〒_〒 居然一个评论都没有……
文明上网,理性发言! 😉 阿里云幸运券,
戳我领取
发表评论
提交回复
我的积分余额:
0
已下载次数:
610
所需牛币:
5
开始下载
牛币获取:
签到、评论、充值
» 在线充值
(10牛币=1元)
成为VIP可永久免积分下载全部常用代码
» 查看详情
VIP
客服
签到
充值