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;
}

 

 

 

 

posted @ 2020-03-09 17:51  古墩古墩  Views(7709)  Comments(0Edit  收藏  举报