<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>简洁Tab</title>
<style type="text/css">
<!--
body, div, ul, li {padding:0;text-align:center;}
body {font:12px "宋体";text-align:center;}
a:link {color:#00F;text-decoration:none;}
a:visited {color: #00F;text-decoration:none;}
a:hover {color: #c00;text-decoration:underline;}
ul {list-style:none;}
/*选项卡1*/
#Tab1 {width:900px;margin:0px;padding:0px;margin:0 auto;}
/*菜单class*/
.Menubox {width:100%;background:url();height:28px;line-height:28px;}
.Menubox ul {margin:0px;padding:0px;}
.Menubox li {float:left;display:block;cursor:pointer;width:114px;text-align:center;color:#949694;font-weight:bold;}
.Menubox li.hover {padding:0px;background:#fff;width:116px;border-left:1px solid #A8C29F;border-top:1px solid #A8C29F;border-right:1px solid #A8C29F;background:url
();color:#739242;font-weight:bold;height:27px;line-height:27px;}
.Contentbox {clear:both;margin-top:0px;border:1px solid #A8C29F;border-top:none;height:181px;text-align:center;padding-top:8px;}
-->
</style>
</head>
<body>
<br>
<br>
<div id="Tab1">
<div class="Menubox">
<ul>
<li id="one0" onmouseover="setTab('one',0,7)" class="hover">新闻1</li>
<li id="one1" onmouseover="setTab('one',1,7)" >新闻2</li>
<li id="one2" onmouseover="setTab('one',2,7)">新闻3</li>
<li id="one3" onmouseover="setTab('one',3,7)">新闻4</li>
<li id="one4" onmouseover="setTab('one',4,7)">新闻5</li>
<li id="one5" onmouseover="setTab('one',5,7)">新闻6</li>
<li id="one6" onmouseover="setTab('one',6,7)">新闻7</li>
</ul>
</div>
</div>
<br>
<script>
<!--
/*第一种形式 第二种形式 更换显示样式*/
var index;
function setTab(name,cursel,n){
for(var i=0;i<n;i++){
var menu=document.getElementById(name+i);
menu.className=i==cursel?"hover":"";
if (menu.className=="hover")
iindex=i;
}
}
var num=0;
var AutoPlayObj=null;
function d()
{
setTab('one',num%7,7);
num++;
}
function AutoPlay()
{
clearInterval(AutoPlayObj);
AutoPlayObj=setInterval('d()',500)
};
AutoPlay();
var tab1 = document.getElementById("Tab1");
tab1.onmouseover = function (){
num=index;
clearInterval(AutoPlayObj);
}
tab1.onmouseout = function(){AutoPlay();}
//-->
</script>
</body>
</html>

最新文章

  1. Coursera-Getting and Cleaning Data-week1-课程笔记
  2. 开始VS 2012 中LightSwitch系列的第1部分:表中有什么?描述你的数据
  3. Alignment
  4. c++算术运算时数据类型提升带来的问题
  5. 【译】 AWK教程指南 5AWK中的数组
  6. 使用Zipalign工具优化Android APK应用记录
  7. Annikken Andee–Arduino与Android间的简易连接
  8. SAE利用storge上传文件 - myskies的专栏 - 博客频道 - CSDN.NET
  9. 安卓里面JSON处理和JAVA SE里面的JSON包
  10. TimeUnit
  11. string转化为int方法
  12. BFS:noi6044鸣人与佐助
  13. 【Centos7】安装mongodb 使用yum源
  14. 编码格式简介:ASCII码、ANSI、GBK、GB2312、GB18030和Unicode、UTF-8,BOM头
  15. Spring Boot 2.x 编写 RESTful API (六) 事务
  16. springboot整合springdata-jpa
  17. [再寄小读者之数学篇](2014-06-22 最大值点处导数为零的应用 [中国科学技术大学2012 年高等数学B考研试题])
  18. java中的hashmap理解
  19. selenium启动谷歌浏览器
  20. git在Linux下的安装

热门文章

  1. Linux常用指令---grep(搜索过滤)
  2. Activiti系列:如何把Activiti工程转换为maven工程以解决依赖项找不到的问题
  3. Javascript的字面量对象以及如何拆解字面量对象
  4. split 方法的正确使用姿势
  5. JavaScript基础---Cookie
  6. AngularJs——grunt神器的使用
  7. [代码片段]javascript检查图片大小和格式
  8. Redis——分布式简单使用
  9. java模板和回调机制学习总结
  10. 问问题_Java一次导出百万条数据生成excel(web操作)