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.
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