페이지에서 style을 분리하기위해 css 파일을 생성한다.
css 파일의 시작은 항상
@charset
이어야 한다.
이클립스에서 css 파일 만들기를 하면 친절하게 @charset "UTF-8"; 넣어서 파일을 만들어 준다.
이클립스 경로>
Project Explorer> 오른쪽 마우스 클릭> New> Other...> Wizards: css 입력> Web - CSS File 선택
출처>
이클립스
Project Explorer> 오른쪽 마우스 클릭> New> Other...> Wizards: css 입력> Web - CSS File 선택
모질라 개발자 사이트
@charset
https://developer.mozilla.org/ko/docs/Web/CSS/@charset
@charset CSS at-규칙은 스타일 시트에 쓰이는 문자 인코딩을 지정합니다. 스타일 시트의 첫 번째 요소여야 하며 어떤 문자가 선행되지 않아야 합니다; 중첩된 문이 아니기에, 조건부 그룹 at-규칙 내에 사용될 수 없습니다. 여러 @charset at-규칙이 정의된 경우, 첫 번째 것만 사용되고 HTML 요소의 style attribute 또는 HTML 페이지의 문자 집합과 관련 있는 <style> 요소 내에서 사용될 수 없습니다.
The @charset CSS at-rule specifies the character encoding used in the style sheet. It must be the first element in the style sheet and not be preceded by any character; as it is not a nested statement, it cannot be used inside conditional group at-rules. If several @charset at-rules are defined, only the first one is used, and it cannot be used inside a style attribute on an HTML element or inside the <style> element where the character set of the HTML page is relevant.
'etc > html, css' 카테고리의 다른 글
[html] blockquote 사용하기 (0) | 2020.09.04 |
---|---|
[css] 문서에 css 추가하기 - <link rel="stylesheet" href=""> (0) | 2020.08.15 |
[css] display: flex - 중앙 정렬 하기 (0) | 2020.07.14 |
[css] rem 단위는 무엇이고, 왜 사용하나 (0) | 2020.06.29 |
[css] 배경 모든 속성 설정 - background: 이미지 경로, 위치/크기, 반복, 색상 등 (0) | 2020.06.26 |