transition: 변화하는부분 지속시간 ease-in-out; ,로 추가 transition 쓸 수 있다. a {
color: whitesmoke;
background-color: tomato;
padding: 3px 5px;
border-radius: 5px;
transition: font-size 1s ease-in-out, color 1s ease-in-out;
}
a:hover {
font-size: 10px;
color: tomato;
background-color: whitesmoke;
}
** https://matthewlein.com/tools/ceaser css 애니메이션 ease-in-out 등 설명 참조
transform: rotateY(85deg) translateX(60px) // 요소 이동; img {
border-radius: 5px;
transition: transform 2s ease-in-out;
}
img:hover {
transform: rotateY(90deg) scale(0.5);
color: green;
}
** transform mdn !g 검색
@keyframes 애니메이션명 {}@keyframes super {
from {
transform: rotateX(0);
}
to {
transform: rotateX(360deg);
}
img {
border-radius: 5px;
transition: transform 2s ease-in-out;
animation: super 5s ease-in-out infinite;
}
@keyframes super {
0% {
transform: rotateY(0);
}
50% {
transform: rotateY(25deg);
border-radius: 50%;
}
100% {
transform: rotateY(360deg);
opacity: 0;
}
}
img {
border: 5px solid black;
animation: super 5s ease-in-out infinite;
}
@media screen and (조건) and (조건).. 조건이 true이면 디자인을 적용한다. @media screen and (min-width: 400px) and (max-width:600px) { // 화면크기가 400px보다 크고 600보다 작으면 적용.
div {
background-color: tomato;
}
}
- media screen에 (orientation: landscape 혹은 portrait)를 이용하면, 세로모드인지 가로모드인지도 구별 할 수 있다.
- 브라우저에서 inspect의 device toolbar를 이용하여 핸드폰 기종 별 사이즈로 브라우저를 볼 수 있다.
- -device-width는 오직 핸드폰에만 적용된다.
Media type- @media screen{}
- @media print{} -- 웹페이지를 프린트 할 때 적용