부트스트랩 텍스트/타이포그래피
부트스트랩의 기본 설정
부트스트랩의 전역 기본 글꼴 크기는 14px이며 줄 높이는 1.428입니다.
<body>
요소 및 모든 단락( ) 에 적용됩니다 <p>
.
또한 모든 <p>
요소에는 계산된 줄 높이의 절반과 같은 아래쪽 여백이 있습니다(기본값은 10px).
부트스트랩 대 브라우저 기본값
이 장에서는 부트스트랩에 의해 브라우저 기본값과 약간 다르게 스타일이 지정되는 일부 HTML 요소를 살펴보겠습니다.
<h1> - <h6>
기본적으로 Bootstrap은 다음과 같은 방식으로 HTML 제목( <h1>
to
)의 스타일을 지정합니다.<h6>
예시
h1 Bootstrap heading (36px)
h2 Bootstrap heading (30px)
h3 Bootstrap heading (24px)
h4 Bootstrap heading (18px)
h5 Bootstrap heading (14px)
h6 Bootstrap heading (12px)
<작은>
Bootstrap에서 HTML <small>
요소는 모든 제목에서 더 가벼운 보조 텍스트를 만드는 데 사용됩니다.
예시
h1 heading secondary text
h2 heading secondary text
h3 heading secondary text
h4 heading secondary text
h5 heading secondary text
h6 heading secondary text
<마크>
부트스트랩은 다음과 같은 방식으로 HTML <mark>
요소의 스타일을 지정합니다.
예시
Use the mark element to highlight text.
<abbr>
부트스트랩은 다음과 같은 방식으로 HTML <abbr>
요소의 스타일을 지정합니다.
예시
The WHO was founded in 1948.
<블록 인용>
부트스트랩은 다음과 같은 방식으로 HTML <blockquote>
요소의 스타일을 지정합니다.
예시
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
오른쪽에 인용문을 표시하려면 .blockquote-reverse
클래스를 사용하세요.
예시
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
<dl>
부트스트랩은 다음과 같은 방식으로 HTML <dl>
요소의 스타일을 지정합니다.
예시
- Coffee
- - black hot drink
- Milk
- - white cold drink
<코드>
부트스트랩은 다음과 같은 방식으로 HTML <code>
요소의 스타일을 지정합니다.
예시
The following HTML elements: span
, section
, and div
defines a section in a document.
<kbd>
부트스트랩은 다음과 같은 방식으로 HTML <kbd>
요소의 스타일을 지정합니다.
예시
Use ctrl + p to open the Print dialog box.
<사전>
부트스트랩은 다음과 같은 방식으로 HTML <pre>
요소의 스타일을 지정합니다.
예시
Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks.
상황별 색상 및 배경
또한 부트스트랩에는 "색상을 통한 의미"를 제공하는 데 사용할 수 있는 몇 가지 컨텍스트 클래스가 있습니다.
텍스트 색상에 대한 클래스는 .text-muted
,
.text-primary
, .text-success
, .text-info
,
.text-warning
및 .text-danger
다음과 같습니다.
예시
This text is muted.
This text is important.
This text indicates success.
This text represents some information.
This text represents a warning.
This text represents danger.
배경색에 대한 클래스는 .bg-primary
,
.bg-success
, .bg-info
, .bg-warning
및 .bg-danger
:
예시
This text is important.
This text indicates success.
This text represents some information.
This text represents a warning.
This text represents danger.
더 많은 타이포그래피 수업
아래의 부트스트랩 클래스를 추가하여 HTML 요소의 스타일을 추가로 지정할 수 있습니다.
Class | Description | Example |
---|---|---|
.lead |
Makes a paragraph stand out | |
.small |
Indicates smaller text (set to 85% of the size of the parent) | |
.text-left |
Indicates left-aligned text | |
.text-center |
Indicates center-aligned text | |
.text-right |
Indicates right-aligned text | |
.text-justify |
Indicates justified text | |
.text-nowrap |
Indicates no wrap text | |
.text-lowercase |
Indicates lowercased text | |
.text-uppercase |
Indicates uppercased text | |
.text-capitalize |
Indicates capitalized text | |
.initialism |
Displays the text inside an <abbr> element in a slightly smaller font size |
|
.list-unstyled |
Removes the default list-style and left margin on list items (works on both <ul> and <ol> ). This class only applies to immediate children list items (to remove the default list-style from any nested lists, apply this class to any nested lists as well) |
|
.list-inline |
Places all list items on a single line | |
.dl-horizontal |
Lines up the terms (<dt> ) and descriptions (<dd> ) in
<dl> elements side-by-side. Starts off like default <dl> s, but when the browser window expands, it will line up side-by-side |
|
.pre-scrollable |
Makes a <pre> element scrollable |
전체 부트스트랩 타이포그래피 참조
모든 타이포그래피 요소/클래스에 대한 완전한 참조는 전체 부트스트랩 타이포그래피 참조 로 이동하십시오 .
또한 컨텍스트 클래스에 대한 자세한 내용은 Bootstrap Helper Classes Reference 를 참조하십시오.