1.Full background ,例子如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="full-background">
...
</div>
</body>
</html>
<script>
</script>
<style>
html,
body {
padding: 0;
margin: 0;
}
.full-background {
height: 100vh;
width: 100%;
background: url('./lwx.jpg') no-repeat;
background-size: 100% 100%;
}
</style>
developer.mozilla.org/en-US/docs/…