4. 다양한 것들을 만들어 보자
글의 가독성과 정리의 편리성을 위한 것들을 익혀두자.
> 버튼을 보면 누르고 싶지
아무튼 난 그렇다.
INPUT
이렇게 생겨도
{: .btn .fs-1}
저렇게 생겨도
{: .btn .btn-outline .fs-8}
[무언갈 담아도](http://google.com){: .btn .btn-green}
[일단](http://example.com/){: .btn .btn-purple .mr-2 }
[눌러본다](http://example.com/){: .btn .btn-blue }
OUTPUT
> 라벨지도 못 참지
언젠가는 유용하게 쓰지 않을까…?
INPUT
파란 휴지줄까
{: .label .label-blue}
빨간 휴지줄까
{: .label .label-red}
노랑으로 주세요
{: .label .label-yellow}
OUTPUT
파란 휴지줄까
빨간 휴지줄까
노랑으로 주세요
> 표
typora
덕분에 표 만드는게 어렵지는 않지만 방법은 알아두자.
INPUT
|한글|영어|숫자|
| --- | --- | --- |
|하나|One|1|
|둘|Two|2|
|삼|Three|3|
OUTPUT
한글 | 영어 | 숫자 |
---|---|---|
하나 | One | 1 |
둘 | Two | 2 |
삼 | Three | 3 |
> 리스트 만들기를 시작하자 헛, 둘, …
목차로도 사용하기 좋고, 사항을 적어나갈 때 유용하다.
INPUT
1. 저기 손님
1. 순서를 지키세요
- 싫어요
- [ ] 순서 지키기
- [x] 순서 안지키기
OUTPUT
- 저기 손님
- 순서를 지키세요
- 싫어요
- 순서 지키기
- 순서 안지키기
그리고 HTML에서 사용된다는 형식이 있길래 주서 왔다.
Definition lists require HTML syntax and aren’t supported with the GitHub Flavored Markdown compiler.
INPUT
<dl>
<dt>이름</dt>
<dd>아무개</dd>
<dt>나이</dt>
<dd>아무살</dd>
</dl>
OUTPUT
- 이름
- 아무개
- 나이
- 아무살
> 여백과 간격 지정
css에 대해 좀 더 공부를 하고 나면 응용할 수 있겠지.. ㅠ
Spacing
These spacers are available to use for margins and padding with responsive utility classes. Combine these prefixes with a screen size and spacing scale to use them responsively.
Classname prefix | What it does |
---|---|
.m- | margin |
.mx- | margin-left , margin-right |
.my- | margin top , margin bottom |
.mt- | margin-top |
.mr- | margin-right |
.mb- | margin-bottom |
.ml- | margin-left |
Classname prefix | What it does |
---|---|
.p- | padding |
.px- | padding-left , padding-right |
.py- | padding top , padding bottom |
.pt- | padding-top |
.pr- | padding-right |
.pb- | padding-bottom |
.pl- | padding-left |
Spacing values are based on a 1rem = 16px
spacing scale, broken down into these units:
Spacer/suffix | Size in rems | Rem converted to px |
---|---|---|
1 | 0.25rem | 4px |
2 | 0.5rem | 8px |
3 | 0.75rem | 12px |
4 | 1rem | 16px |
5 | 1.5rem | 24px |
6 | 2rem | 32px |
7 | 2.5rem | 40px |
8 | 3rem | 48px |
auto | auto | auto |
Use mx-auto
to horizontally center elements.
Horizontal Alignment
Classname | What it does |
---|---|
.float-left | float: left |
.float-right | float: right |
.flex-justify-start | justify-content: flex-start |
.flex-justify-end | justify-content: flex-end |
.flex-justify-between | justify-content: space-between |
.flex-justify-around | justify-content: space-around |
Note: any of the flex-
classes must be used on a parent element that has d-flex
applied to it.
Vertical Alignment
Classname | What it does |
---|---|
.v-align-baseline | vertical-align: baseline |
.v-align-bottom | vertical-align: bottom |
.v-align-middle | vertical-align: middle |
.v-align-text-bottom | vertical-align: text-bottom |
.v-align-text-top | vertical-align: text-top |
.v-align-top | vertical-align: top |
Display
Display classes aid in adapting the layout of the elements on a page:
Class | |
---|---|
.d-block | display: block |
.d-flex | display: flex |
.d-inline | display: inline |
.d-inline-block | display: inline-block |
.d-none | display: none |
Use these classes in conjunction with the responsive modifiers.
This button will be hidden until medium screen sizes:
[ A button ](#url)
{: .d-none .d-md-inline-block }
These headings will be `inline-block`:
### heading 3
{: .d-inline-block }
### heading 3
{: .d-inline-block }