网站建设需要下拉菜单不用JS如何实现呢?

2020-02-08 23:40 admin
  网站建设需要下拉菜单不用JS如何实现呢?煜阳网络公司某工程师今天就遇到了解决的方法。现展示给各位爱建设网站的朋友信参考


<style type="text/css">
@media screen and (min-width:640px)  {
.nav ul li ul{display:none;}
 
.nav a{
text-decoration: none;
}
.nav ul ul{z-index:9999; position:absolute;    padding-top: 18px;}
.nav li{position:relative; display:block;  cursor:pointer;}
.nav li:first-child{}
.nav ul:first-child li:last-child{margin-right:0;}
.nav li li{width:100%; }
.nav li a{display:block; }
.nav li li a{display:block;  }
 
.nav ul ul{display:none;}
.nav ul li:hover > ul{display:block;}
 
.nav a{color:#FFF;}
.nav li li a, .nav li.active li a{color:#333333; background:#F2F2F2; padding:10px;}
.nav li.active a, .nav a:hover{color:#FF9900;}
.nav ul li li:hover > a{color:#FFFFFF; background-color:#B2B2B2;}
}
 
@media screen and (max-width:640px) {
.nav ul li ul{display:none;}
}
 
</style>

<div class="nav"> <div class="wp">
    <ul>
        <li class='dd1'><a href="/">网站首页</a></li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","3")?>">公司简介</a></li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","10")?>">海外移民</a>
<ul>
<li class="erceng_a"><a href="<?php echo ac("article","index","17")?>">美国大西洋绿卡基金</a></li>
<li class="erceng_a"><a href="<?php echo ac("article","index","21")?>">美国EB1A/C投资移民</a></li>
<li class="erceng_a"><a href="<?php echo ac("article","index","29")?>">加拿大魁省投资移民</a></li> 
<li class="erceng_a"><a href="<?php echo ac("article","index","29")?>">PEQ留学移民计划</a></li>
<li class="erceng_a"><a href="<?php echo ac("article","index","25")?>">德国欧盟蓝卡移民</a></li>
</ul>
</li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","44")?>">海外投资</a>
<ul>
<li class="erceng_a"><a href="/">海外美元基金</a></li>
<li class="erceng_a"><a href="/">海外人寿保险</a></li>
<li class="erceng_a"><a href="/">海外房产基金</a></li> 
 
</ul>
 
</li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","36")?>">专家专栏</a></li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","38")?>">海外留学</a></li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","40")?>">海外报税</a></li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","16")?>">机构合作</a></li><li class='dd2'>|</li>
            <li class='dd1'><a href="<?php echo ac("article","index","34")?>">联系我们</a></li>
        </ul>
    </div>
</div>

网站建设需要下拉菜单不用JS如何实现呢? Tag: 如何 建设 网站
在线咨询 拨打电话

电话

13363039260

微信二维码

微信二维码