scrollbar3dLightColor Sets or retrieves the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.
scrollbarArrowColor Sets or retrieves the color of the arrow elements of a scroll arrow.
scrollbarBaseColor Sets or retrieves the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.
scrollbarDarkShadowColor Sets or retrieves the color of the gutter of a scroll bar.
scrollbarFaceColor Sets or retrieves the color of the scroll box and scroll arrows of a scroll bar.
scrollbarHighlightColor Sets or retrieves the color of the track element of a scroll bar.
scrollbarShadowColor Sets or retrieves the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.
scrollbarArrowColor Sets or retrieves the color of the arrow elements of a scroll arrow.
scrollbarBaseColor Sets or retrieves the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.
scrollbarDarkShadowColor Sets or retrieves the color of the gutter of a scroll bar.
scrollbarFaceColor Sets or retrieves the color of the scroll box and scroll arrows of a scroll bar.
scrollbarHighlightColor Sets or retrieves the color of the track element of a scroll bar.
scrollbarShadowColor Sets or retrieves the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.
<!-- saved from url=(0048)http://www.tastelife.net/homepage/css/scroll.htm -->
<HTML><HEAD><TITLE>控制IE5.5浏览器中滚动条</TITLE>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>A {
FONT-SIZE: 11pt; COLOR: white; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 11pt; COLOR: black; TEXT-DECORATION: underline
}
.change {
SCROLLBAR-FACE-COLOR: white; SCROLLBAR-HIGHLIGHT-COLOR: #3868d0; SCROLLBAR-ARROW-COLOR: #3868d0; SCROLLBAR-TRACK-COLOR: white; SCROLLBAR-DARKSHADOW-COLOR: #3868d0; scrollbar-shadow: 1 #3868D0; scrollbar-3dlight: 1#3868D0
}
</STYLE><META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY class=change1 background=控制IE5_5浏览器中滚动条.files/ba0.jpg topMargin=0>
<DIV align=center>
<TABLE height=336 cellSpacing=0 cellPadding=0 width=566 border=0>
<TBODY>
<TR>
<TD style="BACKGROUND-COLOR: #3868d0" width=494 height=15>
<P align=left><A
href="http://www.tastelife.net/index.asp">返回首页>></A><A
href="http://www.tastelife.net/homepage/homepage.asp">学习中心>></A><A
href="http://www.tastelife.net/homepage/homepage.asp?type=css">CSS教程导航>></A>控制IE5.5浏览器中滚动条</P></TD></TR>
<TR>
<TD
style="BORDER-RIGHT: #3868d0 1px solid; BORDER-TOP: #3868d0 1px solid; BORDER-LEFT: #3868d0 1px solid; BORDER-BOTTOM: #3868d0 1px solid"
vAlign=top width=494 height=321>
<CENTER></CENTER><FONT
color=#000080>使用样式表控制IE5.5浏览器中滚动条,如果你使用的是 IE5.5+版本的浏览器,请点击下面的单选框看看效果吧。<BR><BR></FONT>
<FORM action=--WEBBOT-SELF-- method=post>隐藏滚动条:<INPUT
onclick="if(this.checked){document.body.style.overflow='hidden'}"
type=radio value=V2 name=R1> <BR>显示滚动条:<INPUT
onclick="if(this.checked){document.body.style.overflow='auto'}" type=radio
value=V1 name=R1> </FORM>
<FORM action=--WEBBOT-SELF-- method=post>改变滚动条颜色: <INPUT
onclick="if(this.checked){document.body.className='change'}" type=radio
value=V2 name=R1> <BR>还原滚动条颜色: <INPUT
onclick="if(this.checked){document.body.className='change1'}" type=radio
value=V1 name=R1> </FORM>
<P><FONT
color=#000080><BR> 自从dhtml出现以来,微软对dhtml功能的加强就没有停止过,在微软最新的游览器internet
explorer
5.5的的ie5.5增加了许多新的样式表内容,对滚动条的样式进行修改也是其中之一,下面我们简单地介绍一下涉及浏览器滚动条的样式表内容:<BR><BR>1.overflow内容溢出时的设置<BR><BR>overflow-x水平方向内容溢出时的设置<BR><BR>overflow-y垂直方向内容溢出时的设置<BR><BR>以上三个属性设置的值为visible(默认值)、scroll、hidden、auto。<BR><BR>2.scrollbar-3d-light-color立体滚动条亮边的颜色<BR><BR>scrollbar-arrow-color上下按钮上三角箭头的颜色<BR><BR>scrollbar-base-color滚动条的基本颜色<BR><BR>scrollbar-dark-shadow-color立体滚动条强阴影的颜色<BR><BR>scrollbar-face-color立体滚动条凸出部分的颜色<BR><BR>scrollbar-highlight-color滚动条空白部分的颜色<BR><BR>scrollbar-shadow-color立体滚动条阴影的颜色<BR><BR>以上七个属性设置的值都是颜色值,可以使用样式表定义的各种表达方式。<BR><BR>使用以上的样式定义内容,我们可以指定浏览器窗口、多行文本框的滚动条的显示与否和颜色样式,第一组样式属性用于设定被设定对象是否显示滚动条,第二组样式属性则用于设置滚动条的颜色,要注意的本文涉及的样式属性都是ie才能支持的,第二组的样式属性只有ie5.5版本才能支持,所以请大家在调试的时候注意。<BR><BR>我们通过几个实例来讲解上述的样式属性:<BR><BR>1.让浏览器窗口永远都不出现滚动条<BR><BR>没有水平滚动条<BR><BR><body
style="overflow-x:hidden"><BR><BR>没有垂直滚动条<BR><BR><body
style="overflow-y:hidden"><BR><BR>没有滚动条<BR><BR><body
style="overflow-x:hidden;overflow-y:hidden">或<body
style="overflow:hidden"><BR><BR>2.设定多行文本框的滚动条<BR><BR>没有水平滚动条<BR><BR><textarea
style="overflow-x:hidden"></textarea><BR><BR>没有垂直滚动条<BR><BR><textarea
style="overflow-y:hidden"></textarea><BR><BR>没有滚动条<BR><BR><textarea
style="overflow-x:hidden;overflow-y:hidden"></textarea><BR><BR>或<textarea
style="overflow:hidden"></textarea><BR><BR>3.设定窗口滚动条的颜色<BR><BR>设置窗口滚动条的颜色为红色<body
style="scrollbar-base-color:red"><BR><BR>scrollbar-base-color设定的是基本色,一般情况下只需要设置这一个属性就可以达到改变滚动条颜色的目的。<BR><BR>加上一点特别的效果:<BR><BR><body
style="scrollbar-arrow-color:yellow;scrollbar-base-color:lightsalmon"><BR><BR>4.设定其他元素时,基本上一样,你最好是在样式表文件中定义好一个类,这样你就可以重复使用了。<BR><BR>.coolscrollbar<BR><BR>{<BR><BR>scrollbar-arrow-color:yellow;<BR><BR>scrollbar-base-color:lightsalmon;<BR><BR>}<BR><BR>将以上语句加入到样式表文件中或html头部的<style></style>当中,然后使用<BR><BR><textarea
class="coolscrollbar"></textarea><BR><BR>快快行动,让你的主页马上酷起来。</FONT><BR></P>
<TABLE height=1 cellSpacing=0 cellPadding=0 width="112%" border=0>
<TBODY>
<TR>
<TD align=middle width="53%" height=1>
<P align=right></P></TD>
<CENTER>
<TD width="47%" height=1>
<P align=right><INPUT style="BORDER-RIGHT: #000080 1px solid; BORDER-TOP: #000080 1px solid; BORDER-LEFT: #000080 1px solid; COLOR: #000080; BORDER-BOTTOM: #000080 1px solid; BACKGROUND-COLOR: #ffffff" onclick="self.location='../homepage.asp?type=css'" type=button value=返回列表 name=B3></P></TD></CENTER></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>
<P align=center><IFRAME name=ads1 align=top marginWidth=0 marginHeight=0
src="控制IE5_5浏览器中滚动条.files/ads.htm" frameBorder=0 width=468 scrolling=no
height=60></IFRAME><BR><FONT color=#000080>Copyright © </FONT><SPAN
style="BACKGROUND-COLOR: #3868d0"> <A
href="http://www.tastelife.net/">★草原孤星★</A> </SPAN><FONT color=#000080>All
rights reserved</FONT></P></BODY></HTML>
<STYLE type=text/css>BODY {
scrollbar-face-color: 5B4A4A; scrollbar-shadow-color: 644E49; scrollbar-highlight-color: 97836F; scrollbar-3dlight-color: 644E49; scrollbar-darkshadow-color: 000000; scrollbar-track-color: 97836F; scrollbar-arrow-color: FFC625
}
</STYLE>
(上面是我们的三国联盟的颜色(^^:))其中,把以上7组RGB代码改成你想要的颜色(RGB懂的吧?):
scrollbar-face-color //表面颜色,往你右手边看,就是原来那种灰色的,拖动条和上下箭头的周围颜色
scrollbar-shadow-color //阴影颜色,刚才那部分的边边上右边和下边的一点点颜色。原来是黑色的部分
scrollbar-highlight-color //高光颜色,刚才第一部分的边边上右边和下边的一点点颜色。原来是白色的部分
scrollbar-3dlight-color //3D光颜色,和高光部分差不多的位置,(大概就差几个象素)原来是灰色的部分
scrollbar-darkshadow-color //黑阴影颜色.......翻译的-_\\.......和阴影颜色差不多位置的
scrollbar-track-color //轨道颜色,就是整个长条的颜色,原来有点像网格纸的那部分
scrollbar-arrow-color //箭头颜色,上下箭头的颜色(只有两个三角的那部分啊,其他的是表面颜色)