html如何去除左右滑条,移动端左右两边滑动,并且去除滚动条
html代碼如下:
?? ??? ??? ?
籃球
?? ??? ??? ?
籃球
?? ??? ??? ?
籃球
?? ??? ??? ?
籃球
CSS代碼如下:
.yyjx_row {
width:100%;
display: -webkit-box;
justify-content: flex-start;
align-items: center;
white-space: nowrap;
overflow-x: scroll;
overflow-y: hidden;
padding-bottom: 0.2rem;? 兼容ios
&::-webkit-scrollbar { //去除滾動(dòng)條,設(shè)置滾動(dòng)條的背景顏色為透明
background-color: transparent;
display:none;
}
.yyjx_item {
width: 1.5rem;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
margin-right: 0.2rem;
padding-right: 0;
text-align: center;
img {
width: 100%;
height: 1.5rem;
}
span {
width: 100%;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.24rem;
font-weight: bold;
margin-bottom: 0.2rem;
}
}
}
總結(jié)
以上是生活随笔為你收集整理的html如何去除左右滑条,移动端左右两边滑动,并且去除滚动条的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PHP:GnomeSort侏儒排序(附完
- 下一篇: VC函数对象模板