Home >Web Front-end >HTML Tutorial >Solve the problem that the scroll bar color cannot be set under IE6

Solve the problem that the scroll bar color cannot be set under IE6

PHP中文网
PHP中文网Original
2017-03-16 16:42:282011browse

Solution to the inability to set the scroll bar color in IE6

Generally, when setting the scroll bar style, the following CSS code is used:

body 
{ 
    scrollbar-face-color:#f6f6f6; 
    scrollbar-highlight-color:#fff; 
    scrollbar-shadow-color:#eeeeee; 
    scrollbar-3dlight-color:#eeeeee; 
    scrollbar-arrow-color:#000; 
    scrollbar-track-color:#fff; 
    scrollbar-darkshadow-color:#fff; 
}

But it doesn’t matter in IE6 use. The solution is to change the body to html. The modified code is as follows:

html
{ 
    scrollbar-face-color:#f6f6f6; 
    scrollbar-highlight-color:#fff; 
    scrollbar-shadow-color:#eeeeee; 
    scrollbar-3dlight-color:#eeeeee; 
    scrollbar-arrow-color:#000; 
    scrollbar-track-color:#fff; 
    scrollbar-darkshadow-color:#fff; 
}

The above is the detailed solution to the problem of not being able to set the scroll bar color under IE6. For more information, please pay attention to other related articles on the PHP Chinese website!

Related articles:

DIV implements automatic scrolling function and scroll bar color modification

CSS code to set div scroll bar color

How to distinguish different IE versions in style sheets? How to make the scroll bar color compatible with IE8 and IE10?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn