我是 html 和 css 的新手,如何使背景全尺寸?我假设它会在css中?
body {
background: url(../images/bg.jpg) no-repeat;
}
尝试这个:
body {
background: url(../images/bg.jpg) no-repeat;
-webkit-background-size: cover; /*-- Used for Chrome and Safari browsers --*/
-moz-background-size: cover; /*-- Used for Firefox browser --*/
-o-background-size: cover; /*-- Used for Opera browser --*/
background-size: cover; /*-- Used for IE browser --*/
}