css去掉div的滚动条
2024-08-30 20:55:22
懒得讲原理了,直接贴代码:
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>
最新文章
- linux中grep的应用
- html5 炫酷的字幕雨
- jquery.validate remote的用法
- HDU 2516 取石子游戏
- IDEA:Idea注册
- linux mysql查看安装信息
- Code Sign error: No unexpired provisioning profiles found that contain any of the keychain&#39;s signing certificates
- 全球说:要给 OneAlert 点100个赞
- [iOS基础控件 - 6.6.1] 展示团购数据代码
- HDOJ-ACM1017(JAVA)
- PAT_1018 锤子剪刀布
- CUDA与VS2013安装
- android和Vitamio使用比较
- JS和JQuery中的事件托付 学习笔记
- 在ubuntu上安装运行ionic项目
- 987. Binary Number with Alternating Bits
- Mysql忘记数据库密码以及用户授权案例展示
- Ajax异步请求原理的分析
- NSNotification相关
- 关于TFS2010 远程无法创建团队项目的若干问题总结