CSS设置滚动条颜色


我们在浏览网页的时候有时可以看到网页滚动条颜色不是系统默认的样式,而是漂亮的红色或其它颜色样式,其实这就是在网页代码之间加入代码来实现的,这就是CSS设置滚动条颜色的作用。 

  页面滚动条代码及其解释如下:

  scrollbar-3d-light-color 设置或检索滚动条亮边框颜色

  scrollbar-highlight-color 设置或检索滚动条3D界面的亮边(ThreedHighlight)颜色

  scrollbar-face-color 设置或检索滚动条3D表面(ThreedFace)的颜色

  scrollbar-arrow-color 设置或检索滚动条方向箭头的颜色

  scrollbar-shadow-color 设置或检索滚动条3D界面的暗边(ThreedShadow)颜色

  scrollbar-dark-shadow-color 设置或检索滚动条暗边框(ThreedDarkShadow)颜色

  scrollbar-base-color 设置或检索滚动条基准颜色。其它界面颜色将据此自动调整

  CSS设置滚动条颜色实例代码:

<!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设置滚动条颜色 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>

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3