Solution to the blank right side of the background image when the window is reduced using CSS

高洛峰
Release: 2017-03-27 17:32:36
Original
2591 people have browsed it

Solution to the bug that the right side of the CSS background image appears blank when the window is small (compatible with all browsers)

Solution to the blank right side of the background image when the window is reduced using CSS

Solution:

In css Add the following two lines of code and let it decide for itself:

width:expression(document.body.clientWidth min-width:960px;

That is:

.top{
    border:0px solid #f00;
    width:expression(document.body.clientWidth <= 960? "960px": "auto");
    min-width:960px;
    height:29px;
    margin:0px;
    padding:0px;
    url(.. /img/topbar.png) repeat-x;
}
Copy after login

ok, this bug is finally solved.

The above is the detailed content of Solution to the blank right side of the background image when the window is reduced using CSS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template