0955xf

懒得讲原理了,直接贴代码:

css部分:

.slide-box {
margin-top: 200px;
display: -webkit-box;
overflow-x: scroll;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
}

.slide-item {
width: 200px;
height: 200px;
border: 1px solid #ccc;
margin-right: 30px;
}

::-webkit-scrollbar {
width: 0px;
}

::-webkit-scrollbar-track {
background-color: none;
}

::-webkit-scrollbar-thumb {
background-color: none;
}

::-webkit-scrollbar-thumb:hover {
background-color: none;
}

::-webkit-scrollbar-thumb:active {
background-color: none;
}
 
 
html部分:
<div class="slide-box">
<div class="slide-item">1</div>
<div class="slide-item">2</div>
<div class="slide-item">3</div>
<div class="slide-item">4</div>
<div class="slide-item">5</div>
</div>

分类:

技术点:

相关文章:

  • 2021-12-04
  • 2021-11-29
  • 2021-12-25
  • 2021-12-04
  • 2021-12-04
  • 2021-12-14
  • 2021-12-04
  • 2021-12-14
猜你喜欢
  • 2021-10-26
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2021-10-17
相关资源
相似解决方案