礼服一般搭配什么外套:dreamweaver中滚动条代码怎么不起作用?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/07 02:44:37
我的代码是这样的,请问到底是哪里出问题了?折磨了好长时间了
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--

body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}

.bottom {
border-bottom-width: thin;
border-top-style: none;
border-right-style: none;
border-bottom-style: solid;
border-left-style: none;
border-bottom-color: #CCCCCC;
}
.right {
border-bottom-style: none;
border-right-width: thin;
border-top-style: none;
border-right-style: solid;
border-right-color: #CCCCCC;
}
.style1 {
font-size: 14px;
font-family: "宋体", "新宋体";
}
.style2 {
font-family: "宋体", "新宋体";
font-size: 12px;
}
.导航 {
font-family: "宋体", "新宋体";
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
letter-spacing: 15px;
text-align: center;
vertical-align: bottom;
color: #050244;
}

-->

</style>
</head>

代码没错,但是只有IE6.0支持彩色滚动条,你看看浏览器是不是IE5.X

<STYLE>
BODY {
SCROLLBAR-FACE-COLOR: rgb(255,204,0);
SCROLLBAR-3DLIGHT-COLOR: rgb(255,207,116);
SCROLLBAR-DARKSHADOW-COLOR: rgb(255,227,163);
SCROLLBAR-BASE-COLOR: rgb(255,217,93)
}
</STYLE>

要想使页面没有垂直滚动条加入如下代码
<body style="OVERFLOW-X: hidden; OVERFLOW-Y: hidden; width: 100%" >

隐藏滚动条

只需在< body> < /body>之间插入代码:

< body style="overflow-x:hidden;overflow-y:hidden">

其中x表示水平滚动条,将其改为y的话就可以隐藏垂直滚动条。

滚屏显示

当网页中有长篇文章时,浏览起来就比较吃劲了,我们可以使用script代码实现网页的自动滚屏,当双击网页的时候,网页将会自动向下滚动,再次单击时滚动停止。将下面的代码插入到< body> < /body>之间。

< script language"javascript">
var currentpos,timer;
function initialize()
{
timer=setInterval("scrollwindow()",10);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
< /script>