爱易网
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 浏览次数:20206 次
以下是程序代码
<!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多图切换轮换图片播放特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
北京电信推“0月租卡”,同网通话免费
联想国庆完成收购IBM x86服务器
郭美美事件推手被抓 “秦火火”拷问网络底线
小米2S试水高端化 纯“性价比”玩法已成过去式
打车软件竞争白热化:有冷兵器时代意味
唯品会荣登“最贵中概股”的欢喜与哀愁
工信部或本月17日向联通电信颁发FDD牌照
都是300元内 乐视盒子与小米盒子对比体验
传诺基亚5月14日发布会推出Lumia 950
推荐阅读
更多>
Android应用审核乱象:诈骗软件冲上排行榜首
谷歌欲收买WhatsApp添加砝码 对方否认
中移动落马高管盘点:广东移动成反腐重地
HTC曝出特大丑闻:高管诈骗+商业间谍
全球最具“颠覆性”特质的公司排行榜TOP25
阿里物流搭上邮政:京东,我们在终点等你!
用友软件股价逆势下跌 再融资方案现曙光
乐视28日发布手机进展 LeUI系统Mobile版或曝光
地图导航骤起杀机 百度高德重新定义商业模式
魅族黄章惹怒芙蓉姐姐 将跨界推女神手机
Kindle入华遭遇国内厂商“围剿 ” 电信也参战
虚拟运营市场躁动:山西煤老板兴味浓重
揭秘:阿里巴巴“无人认领”的三成股权都归谁
支付宝全面封杀比特币:充值码淘宝店或遭封禁
论:三大运营商运用商店逆袭并非不能够
机器人进一步取代人类:将进军白领任务
快播灭了,还有西瓜:视频网站的灰色江湖还在
智能手机:中国手机市场最受关注十五款产品清点
北京今日实现用支付宝钱包为公交卡充值
这一次,微软将带给我们什么惊喜?