backgroundimage를 가운데정렬 하려면
background-position을 center로 바꾼다.
background를 어둡게 하면 중요한 포인트를 부각하는데 유용하다.
z index를 사용하여 bg-cover를 따로 만든다.
.bg-cover {
position: absolute;
background-color : rgba(0,0,0,0.5);
height: 100%;
width: 100%;
z-index:1;
}
글꼴을 반응형으로 하려면
px 대신 rem을 사용한다.
@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');
.col-md-4 {
transform: scale(1);
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transition: all 0.1s ease-in-out; // 부드러운 모션을 위해 추가
}
.col-md-4:hover {
transform: scale(1.1);
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
}
.img {width:225px; height:180px; overflow:hidden } // 부모를 벗어나지 않고 내부 이미지만 확대
@media (max-width:991px) {
html,body {
font-size: 0.7rem;
}
.background {
position: relative;
background-image:url("https://cdn.pixabay.com/photo/2015/03/26/09/41/tie-690084_960_720.jpg");
background-size: cover;
background-position: center;
font-family: 'Georgia', serif;
height: 80vh;
}
}