백분율과 em의 조합 사용
모든 브라우저에서 작동하는 솔루션은 <body> 요소의 기본 글꼴 크기를 백분율로 설정하는 것입니다.
body {
font-size: 100%;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.875em;
}
p {
font-size: 0.875em;
}
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-size: 100%;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.875em;
}
p {
font-size: 0.875em;
}
</style>
</head>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<p>This is a paragraph.</p>
<p>Specifying the font-size in percent and em displays the same size in all major browsers, and allows all browsers to resize the text!</p>
</body>
</html>

게시글 목록
| 번호 | 제목 |
|---|---|
| 3056 | |
| 3055 | |
| 3054 | |
| 3051 | |
| 3050 | |
| 3049 | |
| 3046 | |
| 3045 | |
| 3044 |
HTML
글자 간격 Letter Spacing
|
| 3043 |
CSS
text-indent
|
| 3042 |
CSS
text-transform
|
| 3041 |
CSS
text-decoration
|
| 3040 |
CSS
Text Alignment
|
| 3039 |
CSS
Text Color
|
| 3038 | |
| 3034 |
CSS
Outline Width
|
| 3033 |
CSS
Outline Color
|
| 3032 |
CSS
CSS Outline
|
| 3027 |
CSS
CSS Box Model
|
| 3026 | |
| 3025 | |
| 3024 |
CSS
CSS Padding
|
| 3023 |
CSS
CSS Margins
|
| 3022 | |
| 3021 | |
| 3020 | |
| 3019 |
HTML
HTML <video> 요소
1
|
| 3018 |
HTML
html google map
|
| 3017 |
HTML
SVG와 캔버스의 차이점
|
| 3016 |
HTML
SVG Logo
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기