css实现左右滑动

            <div class="minVideoViewBox">
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                        <div class="miniStreamView"></div>
                    </div>

css

.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;
    }
    &::-webkit-scrollbar-track{//轨道

    }
    &::-webkit-scrollbar-button{//两端按钮

    }
    &::-webkit-scrollbar-track-piece{//滚动条中间部分
    }
}
.miniStreamView{
    width:80px;
    height:80px;
    display: inline-block;
    background:pink;
    margin:6px;
}

 

 

 

 

上一篇:elementUi的隐藏组件el-scrollbar滚动条


下一篇:JTextArea设置滚动条/与自动换行