<!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>
<style>
body {height: 3000px;}
/* 스크롤 생김 */
#box1 {
width: 1000px;
height: 500px;
/* background-image: url(/background/캡처.PNG);
background-repeat: no-repeat;
background-color: lightblue;
background-position: center; */
background: url(/background/고양이.jpg) no-repeat lightblue;
background-attachment: fixed;
/* 이미지 고정되어있음 / 스크롤 내려도 */
background-size: cover;
}
#box2 {
width: 1000px;
height: 500px;
/* background-image: url(/background/캡처.PNG);
background-repeat: no-repeat;
background-color: lightblue;
background-position: center; */
background: url(/background/고양이.jpg) no-repeat lightblue;
background-attachment: fixed;
/* 이미지 고정되어있음 / 스크롤 내려도 */
background-size: contain;
}
</style>
</head>
<body>
<div id="box1">box01</div>
<div id="box2">box02</div>
</body>
</html>
<!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>
<style>
div {width: 1000px;
height: 300px;
margin: 0 auto;
/* background-image: url(/background/캡처.PNG), url(/background/고양이.jpg);
background-repeat: no-repeat, no-repeat;
background-size: 300px, 200px;
background-position: left top, right top;
background-color: beige; */
background: url(/background/고양이.jpg) no-repeat left top / 500px,
url(/background/캡처.PNG) no-repeat left center / 700px;
background-blend-mode: overlay;
}
</style>
</head>
<body>
<div>div입니다</div>
</body>
</html>