Home > Web Front-end > HTML Tutorial > CSS问题。怎么才能让背景图无时无刻都能充满整个页面。无论分辨率是怎样。_html/css_WEB-ITnose

CSS问题。怎么才能让背景图无时无刻都能充满整个页面。无论分辨率是怎样。_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-21 08:46:05
Original
1183 people have browsed it


当我变窄的时候,下方就有空白了。我想让他无论变窄还是怎样都能保持充满整个页面。该怎么调整,贴代码上来给各位大牛指点一下。

body{	font-family: "Microsoft Yahei","微软雅黑",'Arial',sans-serif;	height: 100%;	width: 100%;    background-image:url("../Photo/web_wechat_login_bg28a2f7.jpg");	background-size:cover;	background-repeat: no-repeat;}
Copy after login


回复讨论(解决方案)

background-size: 100% 100%;

background-size: 100% 100%;

这个不行,变得更加空白了

html {	height: 100%;}body {	height: 100%;	background-image: url("Pictures.jpg");	background-repeat: no-repeat;	background-size: 100% 100%;}
Copy after login
Copy after login
Copy after login
Copy after login

html {	height: 100%;}body {	height: 100%;	background-image: url("Pictures.jpg");	background-repeat: no-repeat;	background-size: 100% 100%;}
Copy after login
Copy after login
Copy after login
Copy after login

嗯嗯,行了。感谢大牛解答,能给我讲讲为什么html要设100%才行吗?


html {	height: 100%;}body {	height: 100%;	background-image: url("Pictures.jpg");	background-repeat: no-repeat;	background-size: 100% 100%;}
Copy after login
Copy after login
Copy after login
Copy after login

嗯嗯,行了。感谢大牛解答,能给我讲讲为什么html要设100%才行吗?


http://www.webhek.com/css-100-percent-height



html {	height: 100%;}body {	height: 100%;	background-image: url("Pictures.jpg");	background-repeat: no-repeat;	background-size: 100% 100%;}
Copy after login
Copy after login
Copy after login
Copy after login

嗯嗯,行了。感谢大牛解答,能给我讲讲为什么html要设100%才行吗?
http://www.webhek.com/css-100-percent-height 感谢
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