• 纯css实现移动端横向滑动列表


    前几天在公司做开发的时候碰到一个列表横向滑动的功能,当时用了iscroll做,结果导致手指触到列表的范围内竖向滑动屏幕滑动不了的问题。

    这个问题不知道iscroll本身能不能解决,当时选择了换一种方式来做,只要css就能搞定了,主要是利用了display:-webkit-box来实现。

    <!DOCTYPE html>
    <html>
    <head>
        <title>横向滑动</title>
        <style type="text/css">
            .slide-box{
                margin-top: 200px;
                display: -webkit-box;
                overflow-x: scroll;
                -webkit-overflow-scrolling:touch;
            }
            .slide-item{
                width: 200px;
                height: 200px;
                border:1px solid #ccc;
                margin-right: 30px;
            }
        </style>
    </head>
    <body>
        <div class="slide-box">
            <div class="slide-item"></div>
            <div class="slide-item"></div>
            <div class="slide-item"></div>
            <div class="slide-item"></div>
            <div class="slide-item"></div>
        </div>
    </body>
    </html>
  • 相关阅读:
    sql处理数据库锁的存储过程
    SQL语句
    partial 函数
    map函数
    python命令行上下 退格,左右键不能用
    postgresql 在linux上的源码安装
    python字典操作
    根据key存不存在查询json
    精典博文
    python解析XML之ElementTree
  • 原文地址:https://www.cnblogs.com/minz/p/6435294.html
Copyright © 2020-2023  润新知