请将下图所示的图片当做背景图,要求铺满整个页面,不允许有空隙

img


帮忙写个代码,纠结了好久,一直都写不对,总是卡在一些地方,写不出来

是要在html页面中铺满整个页面吗

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title> 页面名称 </title>
<style type="text/css">
body {
    background: url('love.png') repeat;
}
</style>
</head>
<body>

</body>
</html>

如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!

img

    background: url(../images/banner.jpg) no-repeat;
    background-size: 100% 100% ;
    background-attachment: fixed;