我們在瀏覽網(wǎng)頁的時候有時可以看到網(wǎng)頁滾動條顏色不是系統(tǒng)默認的樣式,而是漂亮的紅色或其它顏色樣式,其實這就是在網(wǎng)頁代碼之間加入代碼來實現(xiàn)的,這就是CSS設(shè)置滾動條顏色的作用?!?/P>
頁面滾動條代碼及其解釋如下:
scrollbar-3d-light-color 設(shè)置或檢索滾動條亮邊框顏色
scrollbar-highlight-color 設(shè)置或檢索滾動條3D界面的亮邊(ThreedHighlight)顏色
scrollbar-face-color 設(shè)置或檢索滾動條3D表面(ThreedFace)的顏色
scrollbar-arrow-color 設(shè)置或檢索滾動條方向箭頭的顏色
scrollbar-shadow-color 設(shè)置或檢索滾動條3D界面的暗邊(ThreedShadow)顏色
scrollbar-dark-shadow-color 設(shè)置或檢索滾動條暗邊框(ThreedDarkShadow)顏色
scrollbar-base-color 設(shè)置或檢索滾動條基準顏色。其它界面顏色將據(jù)此自動調(diào)整
CSS設(shè)置滾動條顏色實例代碼:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS設(shè)置滾動條顏色 www.phpq.net</title>
<style type="text/css">
<!--
#height {height:1000px;}
html {
scrollbar-face-color:#C00;
scrollbar-highlight-color:#F60;
scrollbar-3dlight-color:#F00;
scrollbar-darkshadow-color:#000;
scrollbar-Shadow-color:#000;
scrollbar-arrow-color:#FFF;
scrollbar-track-color:#D6A27E;
}
-->
</style>
</head>
<body>
<div id="height"></div>
</body>
</html>
如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會為你解答??! 點擊進入論壇