[CSS] responsiveFullScreen ์ด๋ฏธ์ง ๋ฃ๊ธฐ
img VS background-image
script์์ด HTML / CSS ๋ง ์ฌ์ฉ!!
#1. background-image
<div class="bg"></div>
* { margin: 0; padding: 0; }
html, body { height: 100%; }
.bg {
background-image: url("https://www.w3schools.com/howto/img_girl.jpg");
background-position: center;
background-size: cover;
background-repeat: no-repeat;
height: 100%;
}
#2. img
2-1) [์์ 1]
<div class="bg">
<img src="https://www.w3schools.com/howto/img_girl.jpg">
</div>
html, body { margin: 0; height: 100%; }
.bg { width: 100%; height: 100%; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
object-fit
์ IE ์ง์๋์ง ์๋๋ค.

#2-2) [์์ 2]