爱易网
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 浏览次数:20178 次
以下是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随机显示图片特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
一大波智能路由器正在袭来:小米、360、极路由大PK
史玉柱卸任巨人网络CEO 继位人选引猜想
阿里巴巴上市后雅虎将面临更大的业绩压力
广东移动高层受调查 中移动或现更大反腐风暴
王建宙解构OTT效劳 中移动重塑飞信平台
京东确定IPO定价区间 最高募资16.9亿美元
全球网络遭史上最大规模攻击:攻击数据每秒300G
韩国研制无线充电系统:一次可充40部手机
惠普董事长莱恩辞职 为巨额财务减记埋单
推荐阅读
更多>
惠普中国转型只是缩影 未来开展不可预期
“宽带中国”计划已正式上升为国家战略
360涉足搜索范围 百度市场份额面临应战
阿里入股虎嗅:媒体的脊梁弯了?未必!
迅雷高管解读财报:收购快盘可快速融入小米
银河证券王锦炎:金融业如何使用大数据
“合聚变”来了 UC优视确认并入阿里巴巴
TD是完成中国梦的一个契机
空气污染器市场乱象丛生 选购需慎重
中国雅虎邮箱今日关停 由盛及衰的背后
屌丝程序猿发家机会来了 用大数据来做生意!
FDD牌照12月将发放 联通电信双4G反击中移动
微软小冰复活再战移动端:改与米聊、易信和触宝合作
只有切到刚需痛点,漫画APP才能走下去
史玉柱卸任巨人网络CEO 继位人选引猜想
团购网站存活率仅18.6% 剩余缺乏千家
国美痛批网购七宗罪 用短暂盈利输了未来
腾讯再次重申:普通微信誉户相对不收费
快递企业征收“份子钱” 成全了谁 苦了谁?
从3G牌照发放看中国4G规划效果