본문 바로가기

HTML5+CSS

부트스트랩 기본1

 

부트스트랩 공식문서[영어] 버전 4.4 최신

https://getbootstrap.com/docs/4.4/utilities/spacing/

부트스트랩 공식문서[한글] 버전 3 구식... 보지 말기

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!-- 부트스트랩 기본 틀 -->
<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <!-- 부트스트랩을 적용하기 위해서는 CSS CDN 이 필요 -->
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
  <!-- 모든 레이아웃 코드는 container 안에서 작성 -->
  <div class="container">
...
  </div>
<!-- 부트스트랩을 적용하기 위해서는 JSS CDN 이 필요 -->
  <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>
 
 
 

부트스트랩 CDN: 온라인서베에서 소스코드 받아쓰기

 

약어의 설명 https://getbootstrap.com/docs/4.4/utilities/spacing/#notation

https://getbootstrap.com/docs/4.4/layout/grid/#grid-options

   
   
   

 

{property}-{sides}-{size}

 

Where property is one of:

  • m - for classes that set margin
  • p - for classes that set padding

Where sides is one of:

  • t - for classes that set margin-top or padding-top
  • b - for classes that set margin-bottom or padding-bottom
  • l - for classes that set margin-left or padding-left
  • r - for classes that set margin-right or padding-right
  • x - for classes that set both *-left and *-right
  • y - for classes that set both *-top and *-bottom
  • blank - for classes that set a margin or padding on all 4 sides of the element

Where size is one of:

  • 0 - for classes that eliminate the margin or padding by setting it to 0
  • 1 - (by default) for classes that set the margin or padding to $spacer * .25
  • 2 - (by default) for classes that set the margin or padding to $spacer * .5
  • 3 - (by default) for classes that set the margin or padding to $spacer
  • 4 - (by default) for classes that set the margin or padding to $spacer * 1.5
  • 5 - (by default) for classes that set the margin or padding to $spacer * 3
  • auto - for classes that set the margin to auto

{property}-{sides}-{breakpoint}-{size}

 

sm, md, lg, xl

'HTML5+CSS' 카테고리의 다른 글

Flex  (0) 2020.03.25
CSS 기본2  (0) 2020.03.23
CSS 기본1  (0) 2020.03.22
HTML5 기본정리  (0) 2020.03.20