爱易网
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 浏览次数:20127 次
以下是程序代码
<!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多图切换轮换图片播放特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
200美元英特尔Android笔记本行将到来
微信今天大面积崩溃 腾讯:因光缆施工被挖断
电信资费新政:三巨头压力大 短期降价仍有争议
摩托罗拉中国区将再裁员 助力公司变身
iSuppli:上网本将于2015年退出市场
同程旅游融资后变土豪 如何烧钱占领市场?
解读苹果收购Beats背后动机:库克在想什么?
阿里国际化再落子:2.49亿美元投资新加坡邮政
诺基亚因充电器问题暂停销售Lumia 2520平板电脑
推荐阅读
更多>
惠普董事长莱恩辞职 为巨额财务减记埋单
苹果股价突破100美元大关:投资者看好iPhone 6
佳能利润大跌三成 智能终端倒逼相机厂商转型
支付宝被曝严重破绽 隐私平安再受质疑
互联网金融一周年:余额宝最接地气,比特币最作死
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
国美在线叫板京东:李俊涛底气在哪?
清点:罗永浩推锤子ROM 小米打法遭模拟
第二梯队也PK:当1号店“遇上”京东手机节
中移动一季度净利大降:手机补贴增长过快
组建铁塔公司倒逼运营商改革 或加速4G网建设
全球五大电信设备商业绩:华为净利居首
中移动业绩增长趋缓 目光转向海外市场
独立工具APP:为亿级用户的商业化而愁
酷派首抓4G时机大丰收,未来份额必降无疑
小米2S试水高端化 纯“性价比”玩法已成过去式
天音通信170套餐试商用放号:流量两年不清零
苏宁双线同价遇难题:第一个吃螃蟹不轻松
黑狐病毒疯传播 电脑管家首推 专杀工具
国内首个大数据系列指数今日发布