首页 >

jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮【jquery】

web前端|js教程jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮【jquery】
左右滚动,焦点图,banner图片,鼠标经过
web前端-js教程
jquery左右滚动焦点图banner图片,鼠标经过显示上下页
适合宽和高都比较大的页面使用

演示
2016最新幸运28源码,vscode补全,ubuntu设置su,tomcat效率,qt 编译sqlite,轻云服务器和云主机区别,js插件展示ppt,app手机前端框架,poi 爬虫,php哪个版本好,菏泽网络seo,wordpress 企业网站模板,flash mp3网页播放器代码,网上商城模板html,h5页面弹出遮罩层菜单,管理系统登录界面 psd,微信小程序导航源码lzw
 


 
@charset "utf-8";
img { border: 0px; }
.bannerbox { width: 320px; height: 150px; overflow: hidden; margin: 0px auto; }
#focus { width: 320px; height: 150px; clear: both; overflow: hidden; position: relative; float: left; }
#focus ul { width: 320px; height: 150px; float: left; position: absolute; clear: both; padding: 0px; margin: 0px; }
#focus ul li { float: left; width: 320px; height: 150px; overflow: hidden; position: relative; padding: 0px; margin: 0px; }
#focus .preNext { width: 250px; height: 150px; position: absolute; top: 0px; cursor: pointer; }
#focus .pre { left: 0; background: url(../images/sprite.jpg) no-repeat left center; }
#focus .next { rightright: 0; background: url(../images/sprite1.jpg) no-repeat rightright center; }

js文件

2048安卓源码,vscode一键版本选择,ubuntu压力测试,tomcat加载项目原理,爬虫 数据入库,md5解密php代码,珠海百度seo推广机构lzw
$(function () { 
var sWidth = $("#focus").width();
var len = $("#focus ul li").length;
var index = 0;
var picTimer;
var btn = "
便签源码,vscode代码片段缩进,ubuntu 上网测试,tomcat多少行代码,py爬虫架构,php 获取xml数据,seo网络优化师是什么,顶点小说网站源码,可视化模板lzw
";
for (var i = 0; i < len; i++) {
btn += "";
}
btn += "
“;
$(“#focus”).append(btn);
$(“#focus .btnBg”).css(“opacity”, 0);
$(“#focus .btn span”).css(“opacity”, 0.4).mouseenter(function () {
index = $(“#focus .btn span”).index(this);
showPics(index);
}).eq(0).trigger(“mouseenter”);
$(“#focus .preNext”).css(“opacity”, 0.0).hover(function () {
$(this).stop(true, false).animate({ “opacity”: “0.5” }, 300);
}, function () {
$(this).stop(true, false).animate({ “opacity”: “0” }, 300);
});
$(“#focus .pre”).click(function () {
index -= 1;
if (index == -1) { index = len – 1; }
showPics(index);
});
$(“#focus .next”).click(function () {
index += 1;
if (index == len) { index = 0; }
showPics(index);
});
$(“#focus ul”).css(“width”, sWidth * (len));
$(“#focus”).hover(function () {
clearInterval(picTimer);
}, function () {
picTimer = setInterval(function () {
showPics(index);
index++;
if (index == len) { index = 0; }
}, 2800);
}).trigger(“mouseleave”);
function showPics(index) {
var nowLeft = -index * sWidth;
$(“#focus ul”).stop(true, false).animate({ “left”: nowLeft }, 300);
$(“#focus .btn span”).stop(true, false).animate({ “opacity”: “0.4” }, 300).eq(index).stop(true, false).animate({ “opacity”: “1” }, 300);
}
});

jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮【jquery】
  • jq实现酷炫的鼠标经过图片翻滚效果【jquery】
  • jq实现酷炫的鼠标经过图片翻滚效果【jquery】 | jq实现酷炫的鼠标经过图片翻滚效果【jquery】 ...

    jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮【jquery】
  • jquery实现通用版鼠标经过淡入淡出效果【jquery】
  • jquery实现通用版鼠标经过淡入淡出效果【jquery】 | jquery实现通用版鼠标经过淡入淡出效果【jquery】 ...

    jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮【jquery】
  • 基于jquery可配置循环左右滚动例子【jquery】
  • 基于jquery可配置循环左右滚动例子【jquery】 | 基于jquery可配置循环左右滚动例子【jquery】 ...