• 纯css,div隐藏滚动条,保留鼠标滚动效果。


     

    代码如下:

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>

    <style type="text/css">
    ul,li,ol{padding:0;margin:0;}
    .nav_wrap{height:300px;200px;overflow:hidden;border:1px solid #ccc;margin:20px auto;float:left;}
    .nav_ul{height:100%;220px;overflow-y:scroll;overflow-x:hidden}
    .nav_li{border:1px solid #ccc;margin:-1px;height:40px;line-height:40px;text-align:center;font-size:12px;200px}
    .btn_wrap{text-align:center}
    </style>
    </head>
    <body>
    <div class="nav_wrap">
    <ul class="nav_ul">
    <li class="nav_li">我是菜单1</li>
    <li class="nav_li">我是菜单2</li>
    <li class="nav_li">我是菜单1</li>
    <li class="nav_li">我是菜单2</li>
    <li class="nav_li">我是菜单1</li>
    <li class="nav_li">我是菜单2</li>
    <li class="nav_li">我是菜单1</li>
    <li class="nav_li">我是菜单2</li>
    <li class="nav_li">我是菜单1</li>
    <li class="nav_li">我是菜单2</li>
    <li class="nav_li">我是菜单1</li>
    </ul>
    </div>
    </body>
    </html>

    原创:http://blog.csdn.net/liusaint1992/article/details/51277751

  • 相关阅读:
    Python操作Mongo数据库
    Python正则模块
    Python时间模块
    Python协程(下)
    Python协程(中)
    Python协程(上)
    aiohttp
    常用排序算法的Python实现
    江苏省各地级市58同城租房数据
    百合网
  • 原文地址:https://www.cnblogs.com/specialgege/p/5853925.html
Copyright © 2020-2023  润新知