爱易网
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 浏览次数:20125 次
以下是程序代码
<!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多图切换轮换图片播放特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
HDS发布《2013中国CIO洞察白皮书》
微软最后的救命稻草Win 8份额继续上升
央行暂停二维码支付及虚拟信用卡 支付宝微信不知情
苹果优势逐渐丧失 传即将推出廉价iPhone
智能手机:中国手机市场最受关注十五款产品清点
阿里马云:我觉得互联网还有十年可以做
2019双12阿里云老用户怎么参加拼团活动 老用户拼团方法
蜗牛移动董事长石海:号卡被叫停属乌龙事件
盘点改变社会的15种科技:谷歌眼镜将使我们成为半机械人
推荐阅读
更多>
新闻早8点》Facebook失手发布Snapchat类应用
猎豹移动上市押海外市场 与小米有合作空间
携程收买酷讯成定局:转型互联网+投资
看,网络文学今日之繁盛;忆,纯真去哪了?
微软小冰复活再战移动端:改与米聊、易信和触宝合作
途牛开盘价9美元 与发行价持平
京东确定IPO定价区间 最高募资16.9亿美元
中国邮政与阿里合作:邮政网点可做网购自提点
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
总部大楼已换微软Logo:回忆诺基亚的兴衰史
马云自称在美国曾被绑票
玩游戏式的趣味戒烟App:Kwit
200美元英特尔Android笔记本行将到来
9月1日起免征新能源汽车购置税
微软与摩托罗拉授权协议涵盖Android和Chrome设备
酷派首抓4G时机大丰收,未来份额必降无疑
小米年度发布会遭围剿!多款新品难阻品牌危机
iPhone 6将于10月17日内地上市:售5288元起
苏宁易购成世界最慢电商 专家称其涉嫌违约
传360周鸿祎曾试图阻止百度收购91无线