返回jQuery三......登陆

jQuery三级菜单作业

云雾幻灵2019-01-08 17:16:37229

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>三级菜单作业</title>

<script type="text/javascript" src="jquery-3.3.1.min.js"></script>

<style type="text/css">

*{

margin: 0px auto; 

padding: 0px;

}

.menu {

width: 606px;

height: 35px; 

margin: 0px auto; 

background: #cef; 

margin-top: 20px; 

color: #f33; 

border:1px solid #ccc;

border-radius: 7px; 

}

    ul{

    list-style: none;

    border-radius: 15px;

    }

    ul li {

    width: 100px; 

    height: 35px; 

    line-height: 35px; 

    text-align: center; 

    float: left; 

    border-right: 1px dotted #fff; 

    cursor: pointer;

    }

    .twobox li {

    width: 100px; 

    height: 30px; 

    line-height: 30px;

    background: #ffc2b3; 

    color: #096; 

    font-size: 14px; 

    position: relative; 

    border:0px;

    border-radius: 15px;

    }

    .twobox li:hover {

    background: #96f; 

    color: #fff;

    border-radius: 20px;

    }

    .three {

    position: absolute; 

    top: 0px; 

    left: 100px;

    }

    .three li {

    width: 99px; 

    height: 30px; 

    line-height: 30px; 

    border: 0;

    }

</style>

<script type="text/javascript">

$(document).ready(function() {

$('.twobox').hide()

$('.three').hide()


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

$(this).find('.twobox').slideDown(500)

})


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

$(this).find('.twobox').slideUp(500)

})


$('.two').mouseover(function() {

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

})


$('.two').mouseleave(function(){

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

})

})

</script>

</head>

<body>

<div class="menu">

<ul class="one">

<li>首页</li>

<li>

关于我们

<ul class="twobox">

<li>公司简介</li>

<li>领导展示</li>

<li class="two">

组织架构

<ul class="three">

<li>董事长</li>

<li>总经理</li>

<li>副总经理</li>

<li>总监</li>

</ul>

</li>

<li>公司荣誉</li>

<li>发展历程</li>

<li>团队展示</li>

</ul>

</li>

<li>

业务体系

<ul class="twobox">

<li>全部项目</li>

<li>城市综合体</li>

<li>市政环境养护</li>

<li>产业投资与创新</li>

<li class="two">

其它

<ul class="three">

<li>友情链接</li>

<li>内部办公</li>

</ul>

</li>

</ul>

</li>

<li>

新闻资讯

<ul class="twobox">

<li>公司新闻</li>

<li>行业资讯</li>

<li>公司公告</li>

</ul>

</li>

<li>人才招聘</li>

<li>联系我们</li>

</ul>

</div>

</body>

</html>


最新手记推荐

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

全部回复(0)我要回复

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