爱易网
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 浏览次数:20181 次
以下是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随机显示图片特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
三大运营商获通知大减营销费 传3年减400多亿
诺基亚因充电器问题暂停销售Lumia 2520平板电脑
做大电影,阿里控股公司在港成立影业集团
小灵通两年都无信号 顾客起诉联通公司
首批四款“官方”打车软件发布:均为安卓版本
马云自称在美国曾被绑票
虚拟运营商温度有多高?降温OR升温内外有别
评论:马云的成功建立在什么基础上很值得怀疑
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
推荐阅读
更多>
微软不会被颠覆
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
中移动将推出多项4G资费新政
360涉足搜索范围 百度市场份额面临应战
华为美国推出电商网站 发售Mate 2LTE版
曝阿里巴巴一怀孕员工过劳死 加班情况引争议
打车软件“明补变暗补”背后的小算盘
同样的背景,罗永浩和雷军到底有什么不同?
广东移动高层受调查 中移动或现更大反腐风暴
“论文查重”网店一月收入竟过百万
170号码扎堆上市:手机话费私人定制时代到来?
运营商补贴减少 国内通信业拐点逼近
窗口期:还有哪些互联网公司可能今年IPO?
迪信通神秘免费服务揭谜底:充电宝免费带回家
湘鄂情剥离餐饮业务进军大数据的底气在哪里?
猎豹移动上市押海外市场 与小米有合作空间
承载京东C2C野心的拍拍网:梦想丰满,现实骨感
2019双12阿里云老用户怎么参加拼团活动 老用户拼团方法
微软最后的救命稻草Win 8份额继续上升
CSS控制字符长度和显示长度