css實現手機端導航欄左右滑動


<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>test</title>
  <style media="screen">
    .tab-head{
      list-style-type: none;
      display:-webkit-box;
      display:-webkit-flex;
      display:-ms-flexbox;
      display:flex;
      -webkit-flex-wrap:nowrap;
      -ms-flex-wrap:nowrap;
      flex-wrap:nowrap;
      -webkit-box-pack:justify;
      -webkit-justify-content:space-between;
      -ms-flex-pack:justify;
      justify-content:space-between;
      background:#FF4878;
      padding:0;
      overflow:auto;
      }
    .tab-head-item{
      -webkit-box-flex:1;
      -webkit-flex:1 0 auto;
      -ms-flex:1 0 auto;
      flex:1 0 auto;
      color:white;
      padding:0 5px;
      }
  </style>
</head>
<body>
    <ul class="tab-head">
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
        <li class="tab-head-item">興趣愛好</li>
    </ul>
</body>
</html>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM