1920x1080 이미지 (또는 시도한 다른 해상도의 경우)를 사용하면 그림의 맨 위가 잘립니다. 이것을 막을 수있는 방법이 있습니까?너비 100 % 배경 이미지 위로 잘라 내기
div.background {
background-image: url("/images/home.jpg");
background-repeat: no-repeat;
position: absolute;
height: 100%;
width: 100%;
margin-top: 100px;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 0;
background-position: 50% 50%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
div.header {
background-color: red;
width:100%;
height: 100;
margin-top: 0px;
margin-right: 0px;
margin-left: 0px;
margin-bottom: 0px;
padding: 0px 0px 0px 0px;
}
body {
margin: 0px 0px 0px 0px;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/main2.css">
</head>
<body>
<div class="header"></div>
<div class="background"></div>
</body>
</html>
여기에는 헤더가 덮여 있습니다. – cente