如何让背景图片填满屏幕,缩小屏幕不出现滚动条,实现如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
html,body {
height: 100%;
overflow: hidden;
margin: 0;
}
.bg
{
width: 100%;
height: 100%;
background-image: url("./img/吴彦祖.jpg");
background-repeat: no-repeat;
background-position: center top;
background-size: 100% 100%;
overflow: hidden;
}</style>
</head>
<body>
<div class="bg">
</div>
</body>
</html>