我是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 --*/
}