纯css实现 移动端 左右滑动(隐藏滚动条)【转载 https://www.cnblogs.com/fanqiuzhuji/p/12626919.html】


/*方法一*/
.nav_mine {
padding: 15px 20px;
border-bottom: 1px solid #aca9a7;
height: 75px;
display: flex;
align-items: center;
overflow-y: hidden;
flex-wrap: nowrap;
/*overflow-x: hidden*/
}
.nav_mine .nav_item {
border: 1px solid #aca9a7;
border-radius: 40px;
color: #aca9a7;
margin-right: 22px;
font-size: 24px;
padding: 4px 18px;
list-style: none;
white-space: nowrap;
}


/*方法二*/
.minVideoViewBox {
width: 100%;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
&::-webkit-scrollbar{
background: none;
}
&::-webkit-scrollbar-thumb{
background: rgba(71, 145, 242,.5);
border-radius: 5px;
}
}

.miniStreamView {
width: 80px;
height: 80px;
display: inline-block;
background: pink;
margin: 6px;
}
.inner-container::-webkit-scrollbar {
display: none;
}











/*方法三*/
.scroll {
width: 100%;
white-space: nowrap;
overflow-y: hidden;
overflow-x: scroll;
}

.scroll::-webkit-scrollbar {
display: none; /* 隐藏滚动条*/
}

.miniStreamView {
width: 80px;
height: 80px;
display: inline-block;
background: pink;
margin: 6px;











CSS