爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
jquery制作动感的焦点图切换代码JS特效
jquery制作动感的焦点图切换代码JS特效
日期:2014-05-18 浏览次数:20225 次
以下是程序代码
<!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" /> <meta http-equiv="Content-Language" content="zh-cn" /> <title>仿kendoui.com图片切换特效 - js.aiyiweb.com</title> <style type="text/css"> /* YUI reset */ * {margin:0; padding:0;} /* body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0;padding:0;} */ table {border-collapse:collapse;border-spacing:0;} fieldset,img { border:0;} address,caption,cite,code,dfn,em,strong,th,var {font-style:normal;font-weight:normal;} ol,ul,li {list-style:none;} caption,th {text-align:left;} h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;} q:before,q:after {content:'';} abbr,acronym { border:0;} /* my */ .clearfix:after {content: "."; display: block; height: 0; clear: both; visibility: hidden;} .clearfix {zoom:1;} body {color:#333; font-size:12px; font-family:Verdana,Arial,Helvetica,sans-serif;} a {text-decoration:none; color:#333;} a:hover {text-decoration:underline;} .focus {width:600px; height:250px; background:#eee; margin:10px auto; position:relative; overflow:hidden;} .focus ul {} .focus li {width:550px; height:200px; padding:25px; position:absolute; left:600px; top:0;} .focus li h5, .focus li p, .focus li a.button {float:left; position:relative;} .focus li h5 {width:300px; font-size:22px; font-family:"Microsoft YaHei";} .focus li p {width:300px; line-height:22px; font-size:14px; margin:1em 0;} .focus li a.button {width:100px; height:30px; background:#333; cursor:pointer; display:none;} .focus li a.button:hover {background:#666;} .focus li div.imgBox {float:right; width:200px; height:200px; position:relative; background:#f00;} .focus li div.imgBox img {} .focus .btn {position:absolute; width:600px; height:6px; padding:10px; text-align:center; left:0; bottom:0;} .focus .btn span {display:inline-block; width:10px; height:6px; background:#999; margin:0 3px;} .focus .btn span.on {background:#000;} </style> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript"> $(function() { var len = $(".focus ul li").length; var width = 600; //整体宽度,根据此计算偏移量 var indent = 50; //标题隐藏时往回走的一小段长度 var index = 0; var picTimer; var btn = "<div class='btn'>"; for(var i = 0; i < len; i++) { btn += "<span></span>"; } btn += "</div>"; $(".focus").append(btn); $(".focus .btn span").mouseenter(function() { index = $(".focus .btn span").index($(this)); play(index); }).eq(0).trigger("mouseenter"); $(".focus").hover(function() { clearInterval(picTimer); },function() { picTimer = setInterval(function() { play(index); index++; if(index == len) {index = 0;} },5000); }).trigger("mouseleave"); function play(index) { var $now = $(".focus ul li.on"); if($now.length > 0) { $now.find("h5").stop(true,true).animate({left:"-" + (width - indent) + "px"},400,function() { $(this).animate({left:"-"+ (2*width) +"px"},400); }); $now.find("a.button").stop(true,true).fadeTo(400,0); var hideDelay = setTimeout(function() { $now.find("p").stop(true,true).animate({left:"-" + (width
上一篇:狡猾的按钮特效
下一篇:JQUERY多图切换轮换图片播放特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
央行暂停二维码支付及虚拟信用卡 支付宝微信不知情
微软为避免代理权争夺 与大股东达成和解协议
传苹果中移动达成协议:新iPhone兼容TD制式
北京今日实现用支付宝钱包为公交卡充值
苹果收购Beats交易或将延期尚需解决5大问题
欧洲6万人起诉Facebook隐私侵权
Google要求硬件厂商捆绑预装应用的协议曝光
广电地方营业厅的一句“罚停”,暴露出了他们的本质
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
推荐阅读
更多>
埃里克杰克森:阿里IPO估值至少1500亿美元
广电地方营业厅的一句“罚停”,暴露出了他们的本质
三问刘强东:京东为何近来火气这么大?
微博启动自媒体计划 粉丝+收入双激励是亮点
苹果收购Beats交易或将延期尚需解决5大问题
团购网站存活率仅18.6% 剩余缺乏千家
搜狐前副总编何毅加盟乐视 任车联网公司CEO
Skype周年:与微软联姻到底有没有未来?
巧用百度推行系统 突显竞价效果
工信部或本月17日向联通电信颁发FDD牌照
雅安地震 绝不宽恕应用人们爱心的骗子!
黑狐病毒疯传播 电脑管家首推 专杀工具
火一把就死: 百度魔图验证社交游戏衰亡宿命
世界杯让耐克阿迪大打出手 谁能劈开用户大脑?
史上最严电话实名制9月实行 三大难题待解
探析APP移动营销发扬实效的微妙
FDD牌照短期不会发放 联通电信暗自提速建网
唯品会荣登“最贵中概股”的欢喜与哀愁
传360周鸿祎曾试图阻止百度收购91无线
只有切到刚需痛点,漫画APP才能走下去