利用CSS滑動DIV並且沒有滑動條、滑塊、滑動效果


<ul class='imgList'>
    <li>
        <span>demo</span>
    </li>
</ul>    
.imgList {
  &::-webkit-scrollbar {
  display: none;
}
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  li {
    width:px2rem(140);
    height:px2rem(40);
    line-height:px2rem(40);
    border-radius:px2rem(8);
    font-size:px2rem(30);
    text-align: center;
    color:#fff;
    background:#31b995;
    display: inline-block; 
    &:not(:last-child) {
      margin-right: px2rem(20);
    }
  }
}

 


免責聲明!

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



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