利用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