爱易网
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 浏览次数:20189 次
以下是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随机显示图片特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
湘鄂情剥离餐饮业务进军大数据的底气在哪里?
迅雷再次在美提交IPO申请
三星已经将Galaxy S5视为失败之作?
三星手机在国内陷入困境:华为中兴小米紧追
虚拟运营商流量不清零吸引用户 盈利待明
【晚报】女子泰国游晒10照片 流量费2000
蘑菇街CEO陈琪:2015将回归社会化电商
北京今日实现用支付宝钱包为公交卡充值
京东终于想明白,这些年错过的财运,都藏在女人的时装下
推荐阅读
更多>
阿里入股虎嗅:媒体的脊梁弯了?未必!
腾讯为何在与阿里百度的收购比赛中当看客?
富士康欲用机器人产iPhone 6
高通反垄断案下月有望落定
继续涨:微博IPO第二交易日 收盘大涨11.71%
薛蛮子取保后首次发微博表示:辜负你们了
高德百度地图免费背后:李彦宏暗斗马云周鸿祎
网络视频的几大趋势将成视频玩家躲不开的发力点
微软与摩托罗拉授权协议涵盖Android和Chrome设备
谁说黑莓没救?他们在悄悄地深耕企业级市场,在这个领域,苹果三星算什么,他们远远不是黑莓的对手
网曝富士康“二连跳” 疑因推静音模式
国内云服务商存在尴尬:“远程机房+移动大硬盘”模式
曹国伟:微博将关注Facebook和Twitter
国内首个大数据系列指数今日发布
只有切到刚需痛点,漫画APP才能走下去
火狐手机发展前路:或被运营商绑架
NoomWeight减肥
PC迎9年来出货量新低 平板电脑渐成主流
电话用户9月实名制:运营商监管受质疑
小米年度发布会遭围剿!多款新品难阻品牌危机