移動端使用CSS如何?左右滑動的樣本

來源:互聯網
上載者:User
移動端使用CSS如何?左右滑動的樣本

<!DOCTYPE html><html><head>    <title>純css實現左右滑動</title>    <style type="text/css">        ul,li{                list-style: none;;        }        .slide-box{            margin-top:200px;            display: -webkit-box;            overflow-x: auto;            /*適應蘋果*/            -webkit-overflow-scrolling:touch;        }        .slide-item{            width: 300px;            height: 300px;            border:1px solid #ccc;            margin-right: 30px;            background: pink;        }        /*隱藏掉捲軸*/        .slide-box::-webkit-scrollbar {         display: none;       }    </style></head><body>    <ul class="slide-box">        <li class="slide-item"></li>        <li class="slide-item"></li>        <li class="slide-item"></li>        <li class="slide-item"></li>        <li class="slide-item"></li>    </ul></body></html>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.