返回jquery三......登陆

jquery三级导航

久伴2019-01-31 00:08:50232

html:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title>小米商城</title>

<link href="css/index.css" rel="stylesheet" type="text/css" />

<link href="css/commend.css" rel="stylesheet" type="text/css" />

<link href="css/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" />

<script src="js/index.js" type="text/javascript" rel="script"></script>

<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>

<script>

$(document).ready(function() {

$('#two').hide();

$('#three').hide();

$('#hover').mouseover(function() {

$('.hader_cart').slideDown(500)

});

$('#hover').mouseleave(function() {

$('.hader_cart').slideUp(500)

});

$('.header_content>li').mouseover(function() {

$(this).find('#two').slideDown(500)

});

$('.header_content>li').mouseleave(function() {

$(this).find('#two').slideUp(500)

});

$('#two>li').mouseover(function() {

$(this).find('#three').slideDown(500)

});

$('#two>li').mouseleave(function() {

$(this).find('#three').slideUp(500)

});

})

</script>

</head>

<body>

<div class="header">

<div class="header_nav">

<ul class="header_content">

<li><a href="#">小米商城</a></li>

<li><a href="#">MIUI</a></li>

<li><a href="#">loT</a></li>

<li><a href="#">云服务</a></li>

<li><a href="#">金融</a></li>

<li><a href="#">优品</a></li>

<li><a href="#">小爱开放平台</a>

<ul id="two">

<li><a href="#">小爱同学</a></li>

<li><a href="#">小爱家居</a></li>

<li><a href="#">小米手环</a>

<ul id="three">

<li><a href="#">小爱同学</a></li>

<li><a href="#">小爱家居</a></li>

<li><a href="#">小米手环</a></li>

<li><a href="#">小米电视</a></li>

</ul>

</li>

<li><a href="#">小米电视</a></li>

</ul>

</li>

<li><a href="#">政企服务</a></li>

<li><a href="#">下载app</a></li>

<li><a href="#">Select Region</a></li>

<li></li>

<li><a href="#">登录</a></li>

<li><a href="#">注册</a></li>

<li><a href="#">消息通知</a></li>

<li><a href="#" id="hover">

<i class="fa fa-cart-arrow-down"></i>

购物车(0)

</a>

<div class="hader_cart">

<div>购物车中还没有商品,赶紧选购吧!</div>

</div>

</li>

</ul>

</div>

</div>

</body>

</html>


css;

a {

text-decoration: none;

color: #B0B0B0;

background: none

}


.header {

width: 100%;

height: auto;

}


.header_nav {

width: 100%;

background: #333333;

height: auto;

}


.header_content{

width: 1200px;

height: 40px;

margin: 0 auto !important;

display: flex;

align-items: center;

}


.header_content>li {

height: 40px;

float: left;

line-height: 40px;

font-size: 12px;

text-align: center;

border-right: 1px solid #424242;

position: relative;

}


a:hover {

color: white;

}


.header_content>li:nth-child(1) {

width: 60px;

}


.header_content>li:nth-child(2) {

width: 40px;

}


.header_content>li:nth-child(3) {

width: 40px;

}


.header_content>li:nth-child(4) {

width: 45px;

}


.header_content>li:nth-child(5) {

width: 40px;

}


.header_content>li:nth-child(6) {

width: 40px;

}


.header_content>li:nth-child(7) {

width: 100px;

}


.header_content>li:nth-child(8) {

width: 80px;

}


.header_content>li:nth-child(9) {

width: 80px;

}


.header_content>li:nth-child(10) {

width: 100px;

}


.header_content>li:nth-child(11) {

width: 270px;

}


.header_content>li:nth-child(12) {

width: 43px;

}


.header_content>li:nth-child(13) {

width: 43px;

}


.header_content>li:nth-child(14) {

width: 70px;

}


.header_content>li:nth-child(15) {

width: 130px;

height: 30px;

line-height: 30px;


}


.hader_cart {

position: absolute;

width: 320px;

height: 100px;

top: 36px;

left: -190px;

text-align: center;

font-size: 14px;

line-height: 100px;

display: none;

box-shadow: 1px 1px 5px 2px #E0E0E0;


}


.text {

width: 30%;

margin: 50px auto;

height: 200px;

border: 1px solid #ccc;

}


.text_top {

width: 95%;

padding-right: 5%;

text-align: right;

font-size: 13px;

height: 40px;

line-height: 40px;

}


.text_textarea {

width: 90%;

height: 100px;

margin-left: 5%;


}


.text_bottom {

width: 90%;

margin: 0 auto;

font-size: 12px;


}


.text_bottom div {

float: left;

width: 30px;

height: 40px;



}


.text_bottom div {

padding-left: 22px;

height: 40px;

line-height: 40px;

margin-left: 1%;


}


.text_bottom .text_b1 {

background: url(../img/表情.png) no-repeat left center;

background-size: 20px;

}


.text_bottom .text_b2 {

background: url(../img/图片2.png) no-repeat left center;

background-size: 20px;

}


.text_bottom .text_b3 {

background: url(../img/视频.png) no-repeat left center;

background-size: 20px;

}


.text_bottom .text_b4 {

background: url(../img/话题.png) no-repeat left center;

background-size: 20px;

}


.text_bottom .text_b5 {

background: url(../img/微博.png) no-repeat left center;

background-size: 20px;

}


.text_bottom .text_b6 {

background: url(../img/公开.png) no-repeat left center;

background-size: 20px;

}


.text_button {

width: 80px;

height: 30px;

line-height: 30px;

margin: 1% 0% 1% 8.9%;

background: cornflowerblue;

color: white;

font-size: 12px;

}

#two{

position: absolute;

top: 40px;

left: 0px;

width: 100px;

height: auto;

background: #333333;

color: #B0B0B0 !important;

}

#tow>li{

top: 0;

left: 0;

width: 100%;

border-right: none;

border-bottom: 1px solid #424242;

height: 50px;

line-height: 50px;

font-size: 14px;

}

#three{

position: absolute;

top: 80px;

left: 100px;

width: 100px;

height: auto;

background: #333333;

color: #B0B0B0 !important;

}


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送