第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

不明白我的為啥運(yùn)行不出來

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<style type="text/css">

*{margin:0;padding:0;font-size:14px;}

.nav{

width:900px;

margin:0 auto;

}

ul{

height:30px;

list-style:none;

width:100%;

text-align:center;

margin-top:30px;

margin-left:100px;

border-bottom:4px solid yellow;

?}

?/*菜單<li>浮動(dòng)后,<li>脫離文檔流,導(dǎo)致<ul>將失去高度和寬度;如果需要對(duì)<ul>進(jìn)行整體背景設(shè)置,首先要給<ul>定義寬、高。*/

?li{?

? float:left;

? ?

?}

?a {?

display:block;

width:120px;

? height:30px;

? color:black;

? font-size:16px;

? text-decoration:none;

? text-align:center;

? line-height:30px;

? background-color:gray;

?



?}

?.on ,a:hover{

? display:block;

? color:red;

? background-color:yellow;

?

?}

?

?

</style>

<script type="text/javascript">

window.onload=function (){

var aA=document.getElementByTagName('a');

for(var i=0;i<aA.length;i++){

aA[i].onmouseover=function (){

clearInterval(This.time);

var This=this; /*把當(dāng)前的this對(duì)象傳進(jìn)來*/

This.time=setInterval(function (){

This.style.width=This.offsetWidth+8+"px"; /*8是變寬的速度*/

if(This.offsetWidth>=160){

clearInterval(This.time);

}

},30);

}


aA[i].onmouseout=function (){

clearInterval(This.time);

var This=this;

This.time=setInterval(function (){

This.style.width=This.offsetWidth-8+"px";

if(This.offsetWidth<=120){

This.style.width="120px";

clearInterval(This.time);

}

},30);

}

}

}

}

</script>

</head>

<body>

<div class="nav">

<ul>

<li><a class="on" href="">首 ?頁</a></li>

<li><a href="">新聞快訊</a></li>

<li><a href="">產(chǎn)品展示</a></li>

<li><a href="">售后服務(wù)</a></li>

<li><a href="">聯(lián)系我們</a></li>


</ul>

</div>

</body>

</html>

正在回答

1 回答

CSS出錯(cuò)了

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
導(dǎo)航條菜單的制作
  • 參與學(xué)習(xí)       123855    人
  • 解答問題       838    個(gè)

水平、垂直、圓角導(dǎo)航條菜單,讓您的技術(shù)探索之路更高效

進(jìn)入課程

不明白我的為啥運(yùn)行不出來

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)