2017-09-13 55 views
-1

是否有任何CSS/JS/HTML解決方案允許以相同方式在瀏覽器中實現自定義滾動條?在所有瀏覽器中以同樣的方式支持自定義滾動條

我看到只有CSS解決方案,但它在IE/FF中工作。這個主題有什麼新東西嗎?

我不是在尋找「隨時可用」的組件,而是可以在我的頁面上使用的代碼。

回答

-1

你可以(在Chrome和Opera支持) 「在所有的瀏覽器都支持」

::-webkit-scrollbar { 
    width: 6px; 
    background-color: transparent; 
    border-radius: 0; 
    -webkit-border-radius: 0; 
} 

::-webkit-scrollbar-button:vertical { 
    background-color: transparent; 
    border-top: 1px solid transparent; 
    height: 0; 
} 

::-webkit-scrollbar-thumb { 
    background-color: #d9d9d9; 
    border-radius: 17px; 
} 

::-webkit-scrollbar-thumb:hover { 
    background-color: #ccc; 
    cursor: pointer; 
} 
+1

使用CSS :) –

+0

檢查此[鏈接](https://stackoverflow.com/a/21675465/5759857 ) –

+0

我不是在尋找「ready-t-use」組件,而是可以在我的頁面上使用的代碼。 –

相關問題