css를 검은배경, 흰 배경으로
.black-bg {
margin: 0px auto;
width: 100%;
/* max-width: 1200px; */
height: 100%;
position: fixed;
background: rgba(0, 0, 0, 0.5);
z-index: 5;
padding: 30px;
/*display: none; 평소에 숨김. 근데 애니메이션 대용으로는 visibility : hidden; 사용*/
/* 애니메이션 관련 */
visibility: hidden; /*애니메이션 만들때 자주씀*/
opacity: 0; /*투명도 0*/
transition: all 0.2s;
}
.white-bg{
margin: 0px auto;
margin-top: 200px;
height: 400px;
width: 750px;
background: white;
border-radius: 15px;
padding: 30px;
}
이렇게 만들었습니다. 근데 흰 배경에서
.white-bg{
margin: 0px auto;
margin-top: 200px;
height: 400px;
width: 750px;
background: white;
border-radius: 15px;
padding: 30px;
}
이때는 마진탑이 적용이 되고
.white-bg{
margin-top: 200px;
margin: 0px auto;
height: 400px;
width: 750px;
background: white;
border-radius: 15px;
padding: 30px;
}
이때는 마진탑이 적용이 안되더라구요...
바뀐 건 margin-top과 margin의 위치밖에 없는데... 이유를 여쭤봐도 될까요?