zoukankan      html  css  js  c++  java
  • ul制作导航菜单

    首先上图,最终效果:

    HTML代码:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8" />
    <title></title>
    <link rel="stylesheet" href="css/new_file.css" />
    </head>
    <body>
    <div id="qwe">
    <ul>
    <li><a href="#">Menu</a></li>
    <li><a href="#">Menu Menu</a></li>
    <li><a href="#">Menu</a></li>
    <li><a href="#">Menu Menu Menu</a></li>
    <li><a href="#">Menu Menu</a></li>
    </ul>
    </div>
    </body>
    </html>

    CSS代码:


    #qwe{
    200px;
    font-family: "微软雅黑";
    margin: 50px;
    }
    #qwe ul{
    list-style-type: none;
    padding: 0;
    }
    #qwe ul li a{
    text-decoration: none;
    display: block;
    200px;
    height: 25px;
    border-left: 10px solid #333333;
    border-right: 1px solid #666666;
    border-bottom: 1px solid #555555;
    padding-left: 3px;
    margin-bottom: 1px;
    }
    #qwe ul li a:link,#qwe ul li a:visited{
    color: crimson;
    background-color: #999999;
    }
    #qwe ul li a:hover{
    color: green;
    background-color: #777777;
    }
    #qwe ul li a:active{
    color: darkorange;
    }

    备注:其中包含伪类的设置

  • 相关阅读:
    剑指offer——用两个栈实现队列
    根据前序和中序重建二叉树、后序和中序重建二叉树
    归并排序
    排序
    快速排序(java版)
    List
    单链表的基本操作
    集合
    数组
    结构体
  • 原文地址:https://www.cnblogs.com/youcandomore/p/6952260.html
Copyright © 2011-2022 走看看