其他分享
首页 > 其他分享> > css实现左右滑动

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

 

 

 

 

标签:左右,滚动条,width,scrollbar,background,webkit,滑动,css
来源: https://www.cnblogs.com/fqh123/p/12450042.html