<!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>
<style type="text/css">
*
{
margin:0px;
padding:0px;}
#aa
{
height:40px;
width:90px;
top:80px;
left:200px;
background-color:#339;
position:absolute;
overflow:hidden;
text-align:center;
line-height:40px;
}
#bb
{
height:120px;
width:90px;
top:40px;
left:0px;
background-color:#3FC;
position:absolute;
}
table
{
height:120px;
width:90px;
border:0px;
text-align:center;
}
#cc
{
height:40px;
width:90px;
position:absolute;
left:0px;
top:0px;
overflow:hidden;
background-color:#6F6; }
#dd
{
height:40px;
width:90px;
background-color:#666;
position:absolute;
left:90px;
top:0px; }
#ee
{
height:40px;
width:90px;
position:absolute;
left:0px;
top:40px;
overflow:hidden;
background-color:#6F9; }
#ff
{
height:40px;
width:90px;
background-color:#666;
position:absolute;
left:90px;
top:0px; }
#gg
{
height:40px;
width:90px;
position:absolute;
left:0px;
top:80px;
overflow:hidden;
background-color:#F99; }
#hh
{
height:40px;
width:90px;
background-color:#666;
position:absolute;
left:90px;
top:0px; }
</style>
</head>
<body>
<div id="aa" onmouseover="over()" onmouseout="out()">新闻动态
<div id="bb">
<table cellpadding="0" cellspacing="0">
<tr>
<td height="40px" width="90px">
<div id="cc" onmouseover="over1()" onmouseout="out1()">场景
<div id="dd">讲座</div></div></td></tr>
<tr><td height="40px" width="90px"><div id="ee" onmouseover="over2()" onmouseout="out2()">活动<div id="ff">比赛</div></div></td></tr>
<tr><td height="40px" width="90px"><div id="gg" onmouseover="over3()" onmouseout="out3()">杂谈<div id="hh">项目</div></div></td></tr>
</table> <script>
function over()
{
var a = document.getElementById("aa");
a.setAttribute("style","overflow:visible;background-color:yellow");}
function out()
{
var a = document.getElementById("aa");
a.setAttribute("style","overflow:hidden");
}
function over1()
{
var a = document.getElementById("cc");
a.setAttribute("style","overflow:visible;background-color:green");}
function out1()
{
var a = document.getElementById("cc");
a.setAttribute("style","overflow:hidden");
}
function over2()
{
var a = document.getElementById("ee");
a.setAttribute("style","overflow:visible;background-color:yellow");}
function out2()
{
var a = document.getElementById("ee");
a.setAttribute("style","overflow:hidden");
}
function over3()
{
var a = document.getElementById("gg");
a.setAttribute("style","overflow:visible;background-color:red");}
function out3()
{
var a = document.getElementById("gg");
a.setAttribute("style","overflow:hidden");
}
</script>
</div></div>
</body>
</html>

显示效果:

鼠标没有指向时:

鼠标指向“新闻动态”时:

鼠标指向“场景”时:

鼠标指向“活动”时:

鼠标指向“杂谈”时:

HTML&CSS----练习隐藏导航栏(三级导航)的更多相关文章

  1. 纯洁CSS实现下拉菜单和下拉容器(纯洁CSS导航栏和导航下拉容器)

    虽然网上课程似即使案件大同小异,但我还是写,记笔记,也为您提供参考 我希望你能指导批评~~ 首先,我们必须列出ul li 开始我们的导航栏菜单也能说生产: 在下面的页面,我们先建XHTML结构体: & ...

  2. 微信小程序 自定义头部导航栏和导航栏背景图片 navigationStyle

    ​ 这两天因为要做一个带背景的小程序头,哭了,小程序导航栏有背景也就算了,还得让导航栏上的背景顺下来,心态小崩.现在可以单独设置一个页面的小程序头了,但是前提是要微信7.0以上的版本,考虑到兼容性问题 ...

  3. React实现顶部固定滑动式导航栏(导航条下拉一定像素时显示原导航栏样式)

    摘要 基于react的框架开发一个顶部固定滑动式的酷炫导航栏,当导航栏置顶时,导航栏沉浸在背景图片里:当鼠标滑动滚轮时,导航栏固定滑动并展示下拉样式. JS部分 相关技术栈:react.antd.re ...

  4. CSS 导航栏

    实例: 导航栏 Home News Articles Forum Contact About 导航栏 熟练使用导航栏,对于任何网站都非常重要. 使用CSS你可以转换成好看的导航栏而不是枯燥的HTML菜 ...

  5. CSS 笔记——导航栏、下拉菜单、提示工具

    8. 导航栏.下拉菜单.提示工具 (1)导航栏 垂直导航栏 <!DOCTYPE html> <html lang="en"> <head> &l ...

  6. CSS:CSS 导航栏

    ylbtech-CSS:CSS 导航栏 1.返回顶部 1. CSS 导航栏 导航栏 熟练使用导航栏,对于任何网站都非常重要. 使用CSS你可以转换成好看的导航栏而不是枯燥的HTML菜单. 导航栏=链接 ...

  7. HTML&CSS基础学习笔记1.11—导航栏

    上文我们介绍到的<a>标签,由于<a>标签可以用来跳转,所以我们可以拿<a>标签来生成网页的导航栏. 其实在实际运用中,<a>标签就经常会被用来生成导航 ...

  8. zhuang 定制iOS 7中的导航栏和状态栏

    近期,跟大多数开发者一样,我也正忙于对程序进行升级以适配iOS 7.最新的iOS 7外观上有大量的改动.从开发者的角度来看,导航栏和状态栏就发生了明显的变化.状态栏现在是半透明的了,这也就意味着导航栏 ...

  9. 【原创+译文】官方文档中声明的如何创建抽屉导航栏(Navigation Drawer)

    如需转载请注明出处:http://www.cnblogs.com/ghylzwsb/p/5831759.html 创建一个抽屉导航栏 抽屉式导航栏是显示在屏幕的左边缘,它是应用程序的主导航选项面板.它 ...

  10. iOS 7 教程:定制iOS 7中的导航栏和状态栏

    目录(?)[-] iOS 7中默认的导航栏 设置导航栏的背景颜色 在导航栏中使用背景图片 定制返回按钮的颜 修改导航栏标题的字体 修改导航栏标题为图片 添加多个按钮 修改状态栏的风格 隐藏状态栏 总结 ...

随机推荐

  1. springJDBC一对多关系,以及Java递归,jsp递归的实现

    maven编译,springMVC+spring+springJDBC框架. 要实现的功能是一个文件夹下,可能显示n个文件夹,每个文件夹下又可能显示n个文件夹.... 前台效果:

  2. Android 如何让EditText不自动获取焦点

    解决之道:在EditText的父级控件中找一个,设置成 android:focusable="true"     android:focusableInTouchMode=&quo ...

  3. Fresco 源码分析(三) Fresco服务端处理(3) DataSource到Producer的适配器逻辑以及BitmapMemoryCacheProducer处理的逻辑

    4.3.1.2.1 Producer和DataSource之间适配器处理的逻辑 还是从程序的入口开始说吧 CloseableProducerToDataSourceAdapter.create() 源 ...

  4. angularjs教程

    http://www.runoob.com/angularjs/angularjs-routing.htmlA

  5. 联系旭日150安装CentOS5.X版本手记

    有一台旧电脑.想装个Linux.于是上网查了查.据说可以装CentOS5.3.于是我就去下载了一个. 下载地址可以到http://www.centoscn.com/去下载. 我先下载的是5.3版本的I ...

  6. CodeIgniter - 集成七牛云存储

    最近有一个项目需要集成七牛云存储的图片存储和调用功能,程序是基于CodeIgniter2.1.3的PHP框架.刚拿到手完全无从下手的感觉,因为像框架这种东西,想从官方的PHPSDK集成进去,需要改动很 ...

  7. 烟大 Contest1025 - 《挑战编程》第二章:数据结构 Problem A: Jolly Jumpers(水题)

    Problem A: Jolly Jumpers Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 10  Solved: 4[Submit][Status] ...

  8. M方法和D方法的区别

    M方法和D方法的区别 ThinkPHP 中M方法和D方法都用于实例化一个模型类,M方法 用于高效实例化一个基础模型类,而 D方法 用于实例化一个用户定义模型类. 使用M方法 如果是如下情况,请考虑使用 ...

  9. CF 149D Coloring Brackets 区间dp ****

    给一个给定括号序列,给该括号上色,上色有三个要求 1.只有三种上色方案,不上色,上红色,上蓝色 2.每对括号必须只能给其中的一个上色 3.相邻的两个不能上同色,可以都不上色 求0-len-1这一区间内 ...

  10. OracleDBConsoleorcl是具体管什么的服务(转)

    这个服务是oracle EM的就是oracle企业管理器这个工具可以通过网页的方式监控数据库,对数据库参数等做修改.里面还有oracle本身对于当前系统内存,SQL,参数等的建议.DBA可以根绝这些建 ...