HTML+CSS implements navigation bar secondary drop-down menu HTML page

If we want to achieve the effect as shown below

2.jpg

We only need to make corresponding styles for the corresponding html tags. Now we first put the html page tags Write it out, the code is as follows

<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>导航栏加下拉菜单</title>
</head>
<body>
<div id="menu">
    <ul>
        <li><a href=""  class="nodrop">首 页</a></li>
        <li><a href="" class="drop">最火下载站</a>
            <div class="dropdown_1column">
                <div class="col_1">
                    <ul class="simple">
                        <li><a href="#">网站建设</a></li>
                        <li><a href="#">导航条代码</a></li>
                        <li><a href="#">最火下载站</a></li>
                        <li><a href="#">电子商务</a></li>
                        <li><a href="#">网站制作</a></li>
                    </ul>
                </div>
            </div>
        </li>
        <li><a href="#" class="drop">网站建设</a>
            <div class="dropdown_1column">
                <div class="col_1">
                    <ul class="simple">
                        <li><a href="#">网站建设</a></li>
                        <li><a href="#">导航条代码</a></li>
                        <li><a href="#">最火下载站</a></li>
                        <li><a href="#">网站推广</a></li>
                        <li><a href="#">网站优化</a></li>
                        <li><a href="#">网站制作</a></li>
                    </ul>
                </div>
            </div>
        </li>
        <li><a href="#" class="drop">网络营销</a>
            <div class="dropdown_1column">
                <div class="col_1">
                    <ul class="simple">
                        <li><a href="#">网站建设</a></li>
                        <li><a href="#">导航条代码</a></li>
                        <li><a href="#">最火下载站</a></li>
                        <li><a href="#">电子商务</a></li>
                        <li><a href="#">网站推广</a></li>
                        <li><a href="#">网站优化</a></li>
                        <li><a href="#">网站制作</a></li>
                    </ul>
                </div>
            </div>
        </li>
        <li><a href="#" class="drop">网络营销</a>
            <div class="dropdown_1column">
                <div class="col_1">
                    <ul class="simple">
                        <li><a href="#">网站建设</a></li>
                        <li><a href="#">导航条代码</a></li>
                        <li><a href="#">最火下载站</a></li>
                        <li><a href="#">电子商务</a></li>
                        <li><a href="#">网站推广</a></li>
                        <li><a href="#">网站制作</a></li>
                    </ul>
                </div>
            </div>
        </li>
           <li><a href="#"  class="nodrop">关于我们</a></li>
           <li><a href="#"  class="nodrop">联系我们</a></li>
    </ul>
</div>
</body>

You can change the information inside to the information you need


The above code cannot yet achieve the effect of our navigation bar’s secondary drop-down menu. We Seeing the above code, we gave the corresponding class name. Now the next step is to make css styles for the above class, so as to achieve the effect we want



Continuing Learning
||
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>导航栏加下拉菜单</title> </head> <body> <div id="menu"> <ul> <li><a href="" class="nodrop">首 页</a></li> <li><a href="" class="drop">最火下载站</a> <div class="dropdown_1column"> <div class="col_1"> <ul class="simple"> <li><a href="#">网站建设</a></li> <li><a href="#">导航条代码</a></li> <li><a href="#">最火下载站</a></li> <li><a href="#">电子商务</a></li> <li><a href="#">网站制作</a></li> </ul> </div> </div> </li> <li><a href="#" class="drop">网站建设</a> <div class="dropdown_1column"> <div class="col_1"> <ul class="simple"> <li><a href="#">网站建设</a></li> <li><a href="#">导航条代码</a></li> <li><a href="#">最火下载站</a></li> <li><a href="#">网站推广</a></li> <li><a href="#">网站优化</a></li> <li><a href="#">网站制作</a></li> </ul> </div> </div> </li> <li><a href="#" class="drop">网络营销</a> <div class="dropdown_1column"> <div class="col_1"> <ul class="simple"> <li><a href="#">网站建设</a></li> <li><a href="#">导航条代码</a></li> <li><a href="#">最火下载站</a></li> <li><a href="#">电子商务</a></li> <li><a href="#">网站推广</a></li> <li><a href="#">网站优化</a></li> <li><a href="#">网站制作</a></li> </ul> </div> </div> </li> <li><a href="#" class="drop">网络营销</a> <div class="dropdown_1column"> <div class="col_1"> <ul class="simple"> <li><a href="#">网站建设</a></li> <li><a href="#">导航条代码</a></li> <li><a href="#">最火下载站</a></li> <li><a href="#">电子商务</a></li> <li><a href="#">网站推广</a></li> <li><a href="#">网站制作</a></li> </ul> </div> </div> </li>    <li><a href="#" class="nodrop">关于我们</a></li>    <li><a href="#" class="nodrop">联系我们</a></li> </ul> </div> </body>
submitReset Code