728x90
반응형
Using media queries - CSS: Cascading Style Sheets | MDN
Media queries allow you to apply CSS styles depending on a device's general type (such as print vs. screen) or other characteristics such as screen resolution or browser viewport width. Media queries are used for the following:
developer.mozilla.org
- 사용 예시
/* Media Query */
@media screen and (max-width:760px) {
.navbar__toggle-btn {
display: block;
}
#navbar {
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
.navbar__menu {
flex-direction: column;
text-align: center;
display: none;
}
.about__majors {
flex-direction: column;
}
.major {
margin-bottom: 2rem;
}
.skillset {
flex-direction: column;
}
.project {
flex-grow: 1;
}
.testimonial__avatar {
width: 80px;
height: 80px;
}
}
728x90
'Frontend > CSS' 카테고리의 다른 글
[CSS] Grid (0) | 2023.02.18 |
---|---|
[CSS] transition을 통한 자연스러운 동적인 효과 주기 (0) | 2023.01.17 |
[CSS] background/background-image를 활용한 반응형 배경 (0) | 2023.01.16 |
[CSS] flex가 아닐 때 가운데 정렬하기 (0) | 2023.01.15 |
[CSS] CSS를 HTML에서 사용하는 방법 (inline, internal, external) (0) | 2023.01.05 |