forest1, forest2, forest3, science, night1
#forest1 .treeWrap .rightTree {
position: absolute;
width: 304px;
height: 572px;
background-image: url(../img/forest/forest1/righttree.png);
z-index: 10;
}
#forest2 .machineWrap2 .machineLeft {
position: absolute;
width: 123px;
height: 228px;
background-image: url(../img/forest/forest2/machineleft.png);
margin-top: 30px;
z-index: 200;
}
#forest2 .machineWrap2 .machineRight {
position: absolute;
width: 123px;
height: 248px;
background-image: url(../img/forest/forest2/machineright.png);
margin: 10px 0 0 260px;
z-index: 200;
}
@keyframes moveLeft {
from{left: 30px;}
to{left: 0;}
}
from left 35 to left 0 (최초위치로 돌아가는효과)
mobile
#forest3 .forest3Wrap .smallBird,
#forest3 .forest3Wrap .bigBird {
display: none;
}
모바일 화면에서는 움직이는 새들이 보이면 안되기 때문에 display: none; 처리를 해준다.
(모바일에서는 나무이미지에 새가 그려져있음)
#science .scienceWrap .scienceCenterWrap .funnelBack {
✔position: absolute;
width: 488px;
height: 438px;
background-image: url(../img/science/funnelback.png);
}
#science .scienceWrap .scienceCenterWrap .funnelFront {
✔position: relative;
width: 485px;
height: 390px;
background-image: url(../img/science/funnelfront.png);
margin-top: 48px;
}
둘 다 3차원이지만 funnelFront가 나중에 작성됐기 때문에 더 앞에 배치가 된다.
float 사용 시에는 감싸고 있는 영역의 크기가 같거나 커야 레이어 틀어짐 현상이 없다.
자식이 float를 사용하면 일부가 3차원이기 때문에 부모에게 높이값이 없어도 높이값을 줄 수 없음 but, overflow: hidden;을 사용하면 부모에게 높이값을 줄 수 있음.
(자식 중 가장 큰 값을 부모가 가져감, 여기에서는 scienceCenterWrap이 자식 중 가장 크기 때문에 scienceCenterWrap과 부모의 높이(scienceWrap)가 동일하다)
#night1 .starWrap .star1,
#night1 .starWrap .star2,
#night1 .starWrap .star3 {
animation: pulseStar 1s linear infinite alternate ;
}
@keyframes pulseStar {
from { transform: scale(1); }
to { transform: scale(0.8); }
}
지금까지는 계속 transform : rotate(deg)로 애니메이션 효과를 주었지만 night1에서는 scale이란 효과를 주었다.
transform: scale(1) -> transform: scale(0.8)
원래크기 (1)에서 원래크기의 (0.8)로 변화
어제는 이해됐던게 오늘은 또 헷갈리고 총체적난국이다.
역시나 position이 문제다.
absolute와 relative가 또 너무 헷갈린다.
레이아웃 관련 강의를 다시 한번 들어야겠다.
어제와 별반 다를게 없지만 2시간이 넘는 분량이다 보니 집중력도 떨어지고 복습하려고 하니 막막하다.