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

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

鼠標(biāo)經(jīng)過時(shí)清除固定樣式?

http://img1.sycdn.imooc.com//5926efe70001c62708920339.jpg

請(qǐng)問當(dāng)鼠標(biāo)經(jīng)過其他欄目時(shí),清除‘網(wǎng)站首頁(yè)’的樣式,鼠標(biāo)離開時(shí),“網(wǎng)站網(wǎng)頁(yè)”的樣式恢復(fù),是怎么實(shí)現(xiàn)的

正在回答

4 回答

.nav li a:hover{ background-color:#F60; color:#fff}

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

這是一個(gè)事件

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title></title>

<style>

*{margin: 0;padding: 0;list-style: none;}

body{background-color: #323232;}

.tab{margin: 100px;width: 250px;height: 200px;}

.tab ul.tab-nav{height: 30px}

.tab ul li{ color:#fff; padding: 5px;height: 20px;border-radius: 3px 3px 0 0; background-color: #767676;float: left;margin-right: 5px;}

.tab ul li a{display: inline-block;color: #fff;text-decoration: none;}

.tab ul li.actived{background-color: #fff;}

.tab ul li.actived a{color: #555;}

.wrap{width: 250px;height: 180px; padding: 3px; background-color: #fff;}

.wrap .content-item{width: 250px;height: 180px;position: absolute;}

.wrap .content-item img{width: 250px;height: 180px; display: none;}

.wrap .content-item.current img{display: block;}

</style>

</head>

<body>

<div class="js-tab tab">

<ul class="tab-nav">

<li class="actived"><a href="javascript:">新聞</a></li>

<li><a href="javascript:">娛樂</a></li>

<li><a href="javascript:">電影</a></li>

<li><a href="javascript:">科技</a></li>

</ul>

<div class="wrap">

<div class="content-item current"><img src="img/photos-play1.png"></div>

<div class="content-item"><img src="img/photos-play2.png"></div>

<div class="content-item"><img src="img/photos-play3.png"></div>

<div class="content-item"><img src="img/photos-play4.png"></div>

</div>

</div>

</body>

<script type="text/javascript" src="js/jquery.1.10.2.js"></script>

<script>

$(".js-tab ul li").mouseover(function(){

var index=$(this).index();

$(".js-tab ul li").eq(index).addClass("actived").siblings().removeClass("actived");

$(".js-tab .wrap .content-item").eq(index).addClass("current").siblings().removeClass("current");

})

</script>

</html>


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

鼠標(biāo)事件

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

:hover

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

舉報(bào)

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

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

進(jìn)入課程

鼠標(biāo)經(jīng)過時(shí)清除固定樣式?

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

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

幫助反饋 APP下載

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

公眾號(hào)

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