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

三級下拉菜單案例和總結(jié)

original 2019-01-17 15:45:06 189
abstrait:<!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&quo
<!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>
<link rel="stylesheet" type="text/css" href="css/font-awesome-4.7.0/css/font-awesome.min.css">
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<style type="text/css">
*{ margin:0px; padding:0px;}
.header{
width: 100%;
height: 35px;
margin-top:0px;
background:#f8f8f8;

}

.main{
width: 1100px;
height: 35px;
background: #f8f8f8;
margin-right: auto;
margin-left: auto;
margin-top:0px;
}
ul{
list-style-type: none;

}
ul li{ float:left;}

.left li{
    height:35px;
width:100px;
line-height:30px;
text-align: center;
border-right-width:1px;


border-right-color:gray;
border-right-style:solid;





}
.left li:hover{
text-decoration: underline;
}
.right{ width:400px; float:right;}
.right li{height:35px; width:45px; line-height:30px; text-align:center; font-size:14px;}
.xhx{
width: 100%;
position: relative;
border-bottom-color: #CCC;
border-bottom-style: solid;
transform: scaleY(0.4)
}

.onebox li{
width: 100px;
height: 30px;
position: relative;
text-align: left;
top: 5px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;

border-top-color: #CCC;
border-right-color: #CCC;
border-bottom-color: #CCC;
border-left-color: #CCC;

}

.three{
position: absolute;
left: 100px;
top: 0px;
margin-left: 5px;

}
.three li{ width:75px;}
</style>

<script>
$(function(){

$('.onebox').hide()
$('.three').hide()


    $('.left>li').mouseover(function(){
$(this).find('.onebox').slideDown(500)
$('i').attr('class','fa fa-angle-up')

}) 

$('.left>li').mouseleave(function(){
$(this).find('.onebox').slideUp(500)
$('i').attr('class','fa fa-angle-down')
})

$('.onebox>li').mouseover(function(){
$(this).find('.three').slideDown(500)
})


$('.onebox>li').mouseleave(function(){
$(this).find('.three').slideUp(500)
})

})




 


</script>
</head>

<body>
<div class="header">
<div class="main">
<ul class="left">
<li style="margin-left:0px;">創(chuàng)業(yè)網(wǎng)</li>
<li>招商合作&nbsp;<img src="https://a5static.pncdn.cn/templates/a5/201703/images/hot_1.gif" width="22" height="14" /> </li>
<li>申請報道</li>
<li>原創(chuàng)</li>

<li class="one">A5交易所<span class="btn">
 <i class='fa fa-angle-down'></i>  


</span>
<ul class="onebox">
<li><img src="https://a5static.pncdn.cn/templates/a5/201703/images/zjjy-icon.png">&nbsp;網(wǎng)站交易</li>
<li class="two"><img src="https://a5static.pncdn.cn/templates/a5/201703/images/zjjy-icon.png">&nbsp;域名交易
<ul class="three">
<li>數(shù)字域名</li>
<li>字母域名</li>
<li>拼音域名</li>
</ul>
</li>
<li><img src="https://a5static.pncdn.cn/templates/a5/201703/images/zjjy-icon.png">&nbsp;新媒體交易</li>
</ul>
</i>


</li>
</ul>
<ul class="right">
<li>登錄</li>
<li>注冊</li>
<li>微信</li>
<li>微博</li>
<li>手機版</li>
<li style="width:70px; margin-left:5px;">網(wǎng)站導(dǎo)航&nbsp;</li>

</ul>



</div>
<div class="xhx"></div>
</div>


</body>
</html>





<!--總結(jié)

transform: scaleY(0.4) 縮放


mouseover() 鼠標(biāo)位于元素上

mouseleave() 鼠標(biāo)離開元素時


find() 方法獲得當(dāng)前元素集合中每個元素的后代,通過選擇器、jQuery 對象或元素來篩選。

.find() 與 .children() 方法類似,不同的是后者僅沿著 DOM 樹向下遍歷單一層級。


slideDown() 方法用于向下滑動元素。

 slideUp() 方法用于向上滑動元素。

 

 attr() 方法設(shè)置或返回被選元素的屬性值。

 $(selector).attr({attribute:value, attribute:value ...}) 可以設(shè)置多個屬性的值





-->


Professeur correcteur:查無此人Temps de correction:2019-01-17 15:53:53
Résumé du professeur:完成的不錯。下次作業(yè)把代碼縮進,看著整潔,其他做的都不錯,繼續(xù)加油。

Notes de version

Entrées populaires