HTML
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>背景图片拉伸铺满页面</title> <link type="text/css" rel="stylesheet" href="img.css"/> </head> <body> </body> </html>
CSS(图片不拉伸)
body{ background-image: url(../../img/002.jpg); background-size: cover;
/*是否重复*/
background-repeat: }
CSS(图片拉伸)
body{
background-image: url(../../img/002.jpg);
background-size: 100% 100%;
/*是否重复*/
background-repeat: