亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

導(dǎo)航下面的二級導(dǎo)航,顯示和隱藏,

Original 2019-03-11 17:15:02 404
abstract:<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin: 0; padding: 0; } .nav{ height: 40px; bac

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style>

*{

margin: 0;

padding: 0;

}

.nav{

height: 40px;

background: #ccc;

}

.odiv{

width: 500px;

margin: auto;

}

.odiv li{

list-style: none;

width:100px;

height:40px ;

float:left;

line-height: 40px;

text-align: center;

color: white;

position: relative;

cursor: pointer;

}

.box{

position: absolute;

width: 100px;

height: 120px;

left:0;

display: none;

}

.box li{

width: 100px;

height: 40px;

background: red;

}

.odiv li:hover .box{

display: block;

}

.box li:hover {

color: yellow;

background: #ccc;

}

.first:hover{

background: pink;

}


</style>

</head>

<body>

<div class="nav">

<ul class="odiv">

<li class="first">導(dǎo)航1

<ul class="box">

<li>(1)導(dǎo)航一</li>

<li>(2)導(dǎo)航一</li>

<li>(3)導(dǎo)航一</li>

<li>(4)導(dǎo)航一</li>

</ul>

</li>

<li>導(dǎo)航2</li>

<li>導(dǎo)航3</li>

<li class="first">導(dǎo)航4

<ul cla


ss="box">

<li>(1)導(dǎo)航一</li>

<li>(2)導(dǎo)航一</li>

<li>(3)導(dǎo)航一</li>

<li>(4)導(dǎo)航一</li>

</ul>

</li>

<li>導(dǎo)航5</li>

</ul>

</div>

</body>

</html>


Correcting teacher:韋小寶Correction time:2019-03-11 17:32:19
Teacher's summary:寫的很不錯(cuò) css來實(shí)現(xiàn)下拉菜單還是蠻簡單的 總的來說要比js來實(shí)現(xiàn)簡單多了

Release Notes

Popular Entries