雖然工作中并不常用,但是在不常用的屬性里,也有一些常用的屬性
以下是常見的滾動條屬性操作
<style type="text/css">
*{
scrollbar-face-color:#F3F3F3; /*面子*/
scrollbar-arrow-color:#C0C0C0; /*箭頭*/
scrollbar-3dlight-color:#C0C0C0; /*最外左*/
scrollbar-highlight-color:#FFFFFF; /*左二*/
scrollbar-shadow-color:#FFFFFF; /*右二*/
scrollbar-darkshadow-color:#C0C0C0; /*右一*/
scrollbar-track-color:#F3F3F3; /*滑道*/
}
/*滾動條整體*/
::-webkit-scrollbar{
width:14px; /*滾動條寬度*/
}
/*滾動條按鈕*/
::-webkit-scrollbar-button {
}
::-webkit-scrollbar-track{
background-color:#F3F3F3; /*滑道全部*/
}
::-webkit-scrollbar-track-piece{
background-color:#F3F3F3; /*滑道*/
-webkit-border-radius:4px; /*滑道圓角寬度*/
}
::-webkit-scrollbar-thumb{
background-color:#F3F3F3; /*滑動條表面*/
border:solid 1px #C0C0C0; /*滑動條邊框*/
border-radius:4px; /*滑動條圓角寬度*/
}
/*橫豎滾動條交角*/
::-webkit-scrollbar-corner {
background-color: #F3F3F3;
}
/*橫豎滾動條交角圖案*/
::-webkit-resizer {
/*background-image: url(/public/img/resizer-inactive.png);*/
background-repeat: no-repeat;
background-position: bottom right;
}
/*鼠標(biāo)滑過滑動條*/
::-webkit-scrollbar-thumb:hover{
background-color:#F3F3E0;
}
</style>
通過對 "::-webkit-scrollbar"的調(diào)整,可以讓控制條"隱藏",同時(shí)滾動效果仍然能存在,如下
::-webkit-scrollbar{
width:0px; /*將寬度設(shè)為0,滾動條偽消失,實(shí)際上滾動效果仍然存在*/
}
關(guān)于iframe標(biāo)簽的scrolling屬性
定義和用法
scrolling 屬性規(guī)定是否在 iframe 中顯示滾動條。默認(rèn)地,如果內(nèi)容超出了 iframe,滾動條就會出現(xiàn)在 iframe 中。
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。