<分区>
标签 html css google-chrome
<分区>
如何更改 css
中的滚动条样式或更改 chrome 或任何浏览器中的不同 UI。我见过许多具有不同用户界面的网站。
这可以用 css
或 html
来完成吗?
最佳答案
像这样使用css
html {
background: lightgrey;
height: 100%;
overflow: hidden;
}
body {
height: 100%;
background: whitesmoke;
overflow: scroll;
width: 80%;
max-width: 600px;
margin: 0 auto;
padding: 3em;
font: 100%/1.4 serif;
border: 1px solid rgba(0,0,0,0.25)
}
p {
margin: 0 0 1.5em;
}
body::-webkit-scrollbar {
width: 0.2em;
}
body::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}
body::-webkit-scrollbar-thumb {
background-color: red;
outline: 1px solid red;
}
关于html - 如何更改CSS中的滚动条样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29895023/