
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}모든 html 요소는 사각형 모양의 박스에 둘러 쌓여져 있다
background-image: url("./images/london.jpg"); /* 배경 이미지 설정 */
background-position: center center; /* 이미지 위치: 수평/수직 중앙 */
background-repeat: no-repeat; /* 이미지 반복 안 함 */
background-size: cover; /* 이미지가 요소를 완전히 덮도록 비율 유지하며 확대 */
/* 속성 일괄 적용 */
background: url("./images/london.jpg") center center / cover no-repeat;<div class="background-image" aria-label="런던의 야경 배경 이미지">
<!-- 내용 -->
</div>role속성BEM: CSS 클래스 명명 규칙. Block, Element, Modifier로 구성
예시: article__button--cancel
🤔 BEM 방법론을 배웠는데, 만약 아티클 블록이 두 개 있으면 겹치는 게 아닐까?
👨🏫 BEM은 구조로 블록을 나누는 게 아니라 스타일로 나누는 거야. 같은 구조지만 스타일이 다를 경우엔 modifier를 이용하고, 완전히 다를 경우엔 새로운 블록을 만들어 주어야야 한다