如何隐藏滚动条,兼容IE、谷歌、火狐、opera

兼容IE:

    -ms-scroll-chaining: chained;
    -ms-overflow-style: none;
    -ms-content-zooming: zoom;
    -ms-scroll-rails: none;
    -ms-content-zoom-limit-min: 100%;
    -ms-content-zoom-limit-max: 500%;
    -ms-scroll-snap-type: proximity;
    -ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
    -ms-overflow-style: none;
    scrollbar-base-color: white; 
    scrollbar-3dlight-color: white; 
    scrollbar-highlight-color: white; 
    scrollbar-track-color: white;
    scrollbar-arrow-color: white; 
    scrollbar-shadow-color: white;
    scrollbar-dark-shadow-color: white;

 兼容谷歌:

div::-webkit-scrollbar {
    width:0px;
    height:0px;
}
div::-webkit-scrollbar-button    {
    background-color:rgba(0,0,0,0);
}
div::-webkit-scrollbar-track     {
    background-color:rgba(0,0,0,0);
}
div::-webkit-scrollbar-track-piece {
    background-color:rgba(0,0,0,0);
}
div::-webkit-scrollbar-thumb{
    background-color:rgba(0,0,0,0);
}
div::-webkit-scrollbar-corner {
    background-color:rgba(0,0,0,0);
}
div::-webkit-scrollbar-resizer  {
    background-color:rgba(0,0,0,0);
}

 

兼容火狐:

overflow:-moz-scrollbars-none;

兼容opera:

/*o内核*/
div .-o-scrollbar{
    -moz-appearance: none !important;   
    background: rgba(0,255,0,0) !important;  
}
div::-o-scrollbar-button    {
    background-color:rgba(0,0,0,0);
}
div::-o-scrollbar-track     {
    background-color:rgba(0,0,0,0);
}
div::-o-scrollbar-track-piece {
    background-color:rgba(0,0,0,0);
}
div::-o-scrollbar-thumb{
    background-color:rgba(0,0,0,0);
}
div::-o-scrollbar-corner {
    background-color:rgba(0,0,0,0);
}
div::-o-scrollbar-resizer  {
    background-color:rgba(0,0,0,0);
}

 

你可能感兴趣的:(如何隐藏滚动条,兼容IE、谷歌、火狐、opera)