日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

HTML&CSS----练习隐藏导航栏(三级导航)

發布時間:2023/12/19 综合教程 29 生活家
生活随笔 收集整理的這篇文章主要介紹了 HTML&CSS----练习隐藏导航栏(三级导航) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!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&amp;CSS----练习隐藏导航栏(三级导航)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。