The background image changes with the size of the interface_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:22:00
Original
1626 people have browsed it

Background image automatically changes CSS

There is a relatively large background image 2000×648
Use css to set it as the background of the page
The CSS is as follows:
body {text-align: left ; font-family:"新宋体"; margin:auto;padding:0;
font-size:12px;color:#0C0C0C; background-color: #FFF;
BACKGROUND:url(../images /bj.gif) no-repeat;background-position: top center;}

Please tell me how to make the background image automatically resize according to the size of the page, and always display the entire image instead of part of it. ?

Reply to discussion (solution)

The image changes with the size of the page,
.css{
width: 100%;
position: absolute ;
                margin-right: auto; It seems that the method cannot be implemented, waiting for experts to explain the background implementation method.

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