爱易网
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 浏览次数:20169 次
以下是HTML网页特效代码,点击运行按钮可查看效果:
以下是程序代码
<!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>佐佐制造---左右切换内容淘版 </title> <script type="text/javascript"> </script> <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:#333; text-decoration:none; } a:hover { text-decoration:underline; } ul, li { list-style:none; } fieldset, img { border:none; } em, strong, cite, th { font-style:normal; font-weight:normal; } /* New_pro style */ #new_pro { position:relative; width:315px; height:225px; overflow:hidden; margin:50px 0 8px 50px; background:url(/UploadPic/2008-10/200810101543503.gif) no-repeat 0 0; } #new_pro h3 { height:25px; overflow:hidden; font-size:14px; line-height:27px; text-indent:15px; } #new_pro .current { display:block; } #new_pro .normal { display:none; } #new_pro ul { height:200px; overflow:hidden; padding:3px 0 0 5px; background:url(/UploadPic/2008-10/200810101543503.gif) no-repeat -357px 0; } #new_pro ul li { float:left; padding:4px 8px; } #new_pro ul li img { display:block; width:60px; height:60px; } #new_pro ul li span { display:block; width:60px; height:30px; overflow:hidden; margin-top:2px; line-height:15px; } #ranks_change_bar { position:absolute; top:5px; right:5px; } #ranks_change_bar a { display:block; float:left; width:12px; height:15px; overflow:hidden; margin:0 2px; background:url(/UploadPic/2008-10/200810101543503.gif) no-repeat; text-indent:-9999px; } #ranks_change_bar .previous { background-position:-775px -32px; } #ranks_change_bar .previous:hover { background-position:-775px -16px; } #ranks_change_bar .next { background-position:-788px -32px; } #ranks_change_bar .next:hover { background-position:-788px -16px; } #ranks_change_bar .pages_first { background-position:-775px 0 !important; } #ranks_change_bar .pages_last { background-position:-788px 0 !important; } </style> <script type="text/javascript"> function $(id) { return document.getElementById(id); } function addClass(element,value) { if (!element.className) { element.className = value; } else { newClassName = element.className; newClassName+= " "; newClassName+= value; element.className = newClassName; } } function next() { var ranksChangeBarList = $('ranks_change_bar').getElementsByTagName('a'); var previousbar = ranksChangeBarList[0]; var nextbar = ranksChangeBarList[1]; var proList = $('new_pro').getElementsByTagName('ul'); var len = proList.length; for (var i=0; i<len; i++){ if (proList[i].className == 'current' ) { var currentNum = i; } } if(currentNum == len-1) return; if(currentNum == len-2) { addClass(nextbar,'pages_last'); proList[currentNum].className ='normal' proList[currentNum+1].className = 'current' } else { proList[currentNum].className ='normal' proList[currentNum+1].className = 'current' } previousbar.className= 'previous'; } function previous() { var ranksChangeBarList = $('ranks_change_bar').getElementsByTagName('a'); var previousbar = ranksChangeBarList[0];
上一篇:狡猾的按钮特效
下一篇:简单的js随机显示图片特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
称产品遭诋毁 奇虎再诉百度
微软的云服务显示出他们将自我进化
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
聚美向左,唯品向右,怎能耐得住高跟和红唇的诱惑!
黑莓高管:黑莓能作为家“小众公司”活下来
雅安地震 绝不宽恕应用人们爱心的骗子!
想玩P2P?几个您必须知道的潜规则
微软很“捉急”:补贴Win8 重加末尾按钮
推荐阅读
更多>
雅安地震 绝不宽恕应用人们爱心的骗子!
途牛开盘价9美元 与发行价持平
支付宝27日晚间曝严重破绽:买卖记载可被搜索
人们为什么总愿尝试新社交网络?
虚拟运营商们更像三大运营商的“二道贩子”
NEC拟出售移动效劳子公司NEC Mobile
小米发明的“低价抢购”模式还能管用多久?
迪信通神秘免费服务揭谜底:充电宝免费带回家
三大运营商获通知大减营销费 传3年减400多亿
估值增长9.8% 阿里IPO前市值达2450亿美元
三星手机在国内陷入困境:华为中兴小米紧追
诺基亚称不会更名“微软移动” 5月还将发布新品
充斥着假消息负能量的“秘密”缺乏普适性
华为坚持不上市究竟为何?不差钱也不想冒风险
阿里巴巴上市后雅虎将面临更大的业绩压力
刘强东向总理建言:打击有组织有规模的售假商家
曹国伟:微博将关注Facebook和Twitter
电信业营改增今起实施 运营商短期利润骤降
柳传志马云陷舆论漩涡:请不要辜负这个时代
陈天桥之鉴:产品创新被扼杀那些事