爱易网
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特效
很不错的焦点图片切换效果
很不错的焦点图片切换效果
日期:2014-05-18 浏览次数:20232 次
以下是程序代码
<!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" /> <title>js图片切换代码_by 爱易网</title> <style type="text/css"> /* Reset style */ * { margin:0; padding:0; word-break:break-all; } body { background:#FFF; color:#333; font:12px/1.6em Helvetica, Arial, sans-serif; } h1, h2, h3, h4, h5, h6 { font-size:1em; } a { color:#0287CA; text-decoration:none; } a:hover { text-decoration:underline; } ul, li { list-style:none; } fieldset, img { border:none; } legend { display:none; } em, strong, cite, th { font-style:normal; font-weight:normal; } input, textarea, select, button { font:12px Helvetica, Arial, sans-serif; } table { border-collapse:collapse; } html { overflow:-moz-scrollbars-vertical; } /*Always show Firefox scrollbar*/ /* iFocus style */ #ifocus { width:525px; height:245px; margin:20px; border:1px solid #DEDEDE; background:#F8F8F8; } #ifocus_pic { display:inline; position:relative; float:left; width:410px; height:225px; overflow:hidden; margin:10px 0 0 10px; } #ifocus_piclist { position:absolute; } #ifocus_piclist li { width:410px; height:225px; overflow:hidden; } #ifocus_piclist img { width:410px; height:225px; } #ifocus_btn { display:inline; float:right; width:91px; margin:9px 9px 0 0; } #ifocus_btn li { width:91px; height:57px; cursor:pointer; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); } #ifocus_btn img { width:75px; height:45px; margin:7px 0 0 11px; } #ifocus_btn .current { background: url(http://www.byzuo.cn/demo/iFocus/img/ifocus_btn_bg.gif) no-repeat; opacity:1; -moz-opacity:1; filter:alpha(opacity=100); } #ifocus_opdiv { position:absolute; left:0; bottom:0; width:410px; height:35px; background:#000; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); } #ifocus_tx { position:absolute; left:8px; bottom:8px; color:#FFF; } #ifocus_tx .normal { display:none; } </style> <script type="text/javascript"> function $(id) { return document.getElementById(id); } function addLoadEvent(func){ var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function(){ oldonload(); func(); } } } function moveElement(elementID,final_x,final_y,interval) { if (!document.getElementById) return false; if (!document.getElementById(elementID)) return false; var elem = document.getElementById(elementID); if (elem.movement) { clearTimeout(elem.movement); } if (!elem.style.left) { elem.style.left = "0px"; } if (!elem.style.top) { elem.style.top = "0px"; } var xpos = parseInt(elem.style.left); var ypos = parseInt(elem.style.top); if (xpos == final_x && ypos == final_y) { return true; } if (xpos < final_x) { var dist = Math.ceil((final_x - xpos)/10); xpos = xpos + dist; } if (xpos > final_x) { var dist = Math.ceil((xpos - final_x)/10); xpos = xpos - dist; } if (ypos < final_y) { var dist = Math.ceil((final_y - ypos)/10); ypos = ypos + dist; } if (ypos > final_y) { var dist = Math.ceil((ypos - final_y)/10); ypos = ypos - dist; } elem.style.left = xpos + "px"; elem.style.top = ypos + "px"; var repeat = "moveElement('"+elementID+"',"+final_x+","+final_y+","+interval+")"; elem.movement = setTimeout(repeat,interval); } function classNormal(iFocusBtnID,iFocusTxID){ var iFocusBtns= $(iFocusBtnID).
上一篇:狡猾的按钮特效
下一篇:背景斜向移动
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
HTC与苹果三星距离扩展 C2B形式成新武器
中移动五大基地将整改成公司:被指易滋生腐败
9月1日起免征新能源汽车购置税
苹果联合创始人炮轰鲍尔默“一直都在吃老本”
联想国庆完成收购IBM x86服务器
历史惊人相似:如今的库克 曾经的鲍尔默
聚美向左,唯品向右,怎能耐得住高跟和红唇的诱惑!
百度“全网寻人”面前的互联网信息枢纽价值
微软大幅调整Bing在华策略:从高大上到接地气
推荐阅读
更多>
网易微博将正式关闭 用户迁至轻博客LOFTER
盘点改变社会的15种科技:谷歌眼镜将使我们成为半机械人
评论:阿里为什么不试着收购一家香港媒体呢
华为美国推出电商网站 发售Mate 2LTE版
腾讯微信昨晚再现大规模故障 多地受到影响
玩游戏式的趣味戒烟App:Kwit
奇虎360证明了“惟平台化才能生存”是谬论,中国互联网不能少了周鸿祎
二维码支付大战的号角注定已经吹响,尚需标准发放
苹果音乐效劳新战略:与唱片商停止流媒体协作
地图导航骤起杀机 百度高德重新定义商业模式
亚马逊落户上海自贸区:美国货直邮中国
戴尔正告继续上市存风险 称黑石伊坎方案有缺乏
首家国有独资P2P平台上线 或预示政策日渐明朗
iPhone5S组件曝光 印证杀手级功能存在
世界杯让耐克阿迪大打出手 谁能劈开用户大脑?
韩国研制无线充电系统:一次可充40部手机
黑狐病毒疯传播 电脑管家首推 专杀工具
同为70前后人,马云为什么总是像外星人那么瘦
支付宝曝平安破绽:转账信息被谷歌抓取
诺基亚依托规模效应 猛攻国际市场空白