• 导航3种下拉


    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style>
    /*一、下拉菜单ol折叠*/
    *{margin: 0;padding: 0px}
    ul{
    200px;
    height: 50px;
    outline: 1px solid black;
    }
    ul li{
    50%;
    height: 100%;
    outline: 1px solid black;
    text-align: center;
    float: left;
    line-height: 50px;
    list-style: none;
    background: green;
    }
    ul ol{
    100%;
    height: 0;
    transition: all linear 0.5s;
    overflow: hidden;
    outline: 1px solid black;
    }
    ul ol li{
    100%;
    height: 50px;
    text-align: left;
    background: pink;
    outline: 1px solid black;
    }
    ul ol li a{
    color: black;
    text-decoration: none;
    }
    ul li:hover ol{
    height: 150px;
    transition: all linear 1s;
    }
    ul ol li:hover{
    background: yellow;
    }

    </style>
    </head>
    <body>
    <ul>
    <li>帅哥
    <ol>
    <li><a href="#">罗晋</a></li>
    <li><a href="#">刘志鹏</a></li>
    <li><a href="#">周乐</a></li>
    </ol>
    </li>
    <li>美女
    <ol>
    <li><a href="#">刘涛</a></li>
    <li><a href="#">范冰冰</a></li>
    <li><a href="#">刘诗诗</a></li>
    </ol>
    </li>
    </ul>
    </body>
    </html>

    第二种

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style>
    /*二、下拉菜单li折叠*/
    *{margin: 0;padding: 0px}
    ul{
    200px;
    height: 50px;
    outline: 1px solid black;
    }
    ul li{
    50%;
    height: 100%;
    outline: 1px solid black;
    text-align: center;
    float: left;
    line-height: 50px;
    list-style: none;
    background: green;
    }
    ul ol li{
    100%;
    /*变化*/
    height: 0;
    text-align: left;
    background: pink;
    outline: 1px solid black;
    transition: all linear 1s;
    overflow:hidden;
    }
    ul ol li a{
    color: black;
    text-decoration: none;
    }
    ul li:hover ol li{
    height: 50px; /*变化*/
    transition: all linear 1s;
    }
    ul ol li:hover{
    background: yellow;
    }
    </style>
    </head>
    <body>
    <ul>
    <li>帅哥
    <ol>
    <li><a href="#">罗晋</a></li>
    <li><a href="#">刘志鹏</a></li>
    <li><a href="#">周乐</a></li>
    </ol>
    </li>
    <li>美女
    <ol>
    <li><a href="#">刘涛</a></li>
    <li><a href="#">范冰冰</a></li>
    <li><a href="#">刘诗诗</a></li>
    </ol>
    </li>
    </ul>
    </body>
    </html>

    第三种

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style>
    /*三、挂面式二级菜单*/
    *{margin: 0;padding: 0px}
    ul{
    200px;
    height: 50px;
    outline: 1px solid black;
    }
    ul li{
    50%;
    height: 100%;
    outline: 1px solid black;
    text-align: center;
    float: left;
    line-height: 50px;
    list-style: none;
    background: green;
    }
    ul ol{
    100%;
    height: 150px;
    overflow: hidden;
    outline: 1px solid black;
    display: none;
    }
    ul ol li{
    100%;
    height: 50px;
    text-align: left;
    background: pink;
    outline: 1px solid black;
    }
    ul ol li a{
    color: black;
    text-decoration: none;
    }
    ul li:hover ol{
    display: block;
    }
    ul ol li:hover{
    background: yellow;
    }


    </style>
    </head>
    <body>
    <ul>
    <li>帅哥
    <ol>
    <li><a href="#">罗晋</a></li>
    <li><a href="#">刘志鹏</a></li>
    <li><a href="#">周乐</a></li>
    </ol>
    </li>
    <li>美女
    <ol>
    <li><a href="#">刘涛</a></li>
    <li><a href="#">范冰冰</a></li>
    <li><a href="#">刘诗诗</a></li>
    </ol>
    </li>
    </ul>
    </body>
    </html>

  • 相关阅读:
    Redis应用----消息传递
    Memcache存储机制与指令汇总
    文本挖掘预处理之向量化与Hash Trick
    证书(Certificate)与描述文件(Provisioning Profiles)
    IOS使用命令行打包
    IOS使用xcode编译代码
    IOS使用SourceTree
    docker修改docker0 mtu
    linux开机自启动
    设计模式
  • 原文地址:https://www.cnblogs.com/bbqq1314/p/8397613.html
Copyright © 2020-2023  润新知