Bootstrap 4.x 기초정리

By | 2020년 7월 19일
Table of Content

Bootstrap 4.x 기초정리

템플릿

Bootstrap 은 jquery 가 있어야 작동합니다.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Hello, World!</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
</head>
<body>

Hello, World!

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
</body>
</html>

버튼

<button type="button" class="btn">기본 버튼</button>
<button type="button" class="btn btn-default">버튼 default</button><br /><br />

<button type="button" class="btn btn-primary">버튼 primary</button>
<button type="button" class="btn btn-success">버튼 success</button>
<button type="button" class="btn btn-warning">버튼 warning</button>
<button type="button" class="btn btn-info">버튼 info</button>
<button type="button" class="btn btn-danger">버튼 danger</button><br /><br />

<button type="button" class="btn btn-primary btn-lg">버튼 primary lg</button>
<button type="button" class="btn btn-success btn-lg">버튼 success lg</button>
<button type="button" class="btn btn-warning btn-lg">버튼 warning lg</button>
<button type="button" class="btn btn-info btn-lg">버튼 info lg</button>
<button type="button" class="btn btn-danger btn-lg">버튼 danger lg</button><br /><br />

<button type="button" class="btn btn-primary btn-sm">버튼 primary sm</button>
<button type="button" class="btn btn-success btn-sm">버튼 success sm</button>
<button type="button" class="btn btn-warning btn-sm">버튼 warning sm</button>
<button type="button" class="btn btn-info btn-sm">버튼 info sm</button>
<button type="button" class="btn btn-danger btn-sm">버튼 danger sm</button>

텍스트

<p class="text-primary">text-primary</p>
<p class="text-success">text-success</p>
<p class="text-warning">text-warning</p>
<p class="text-info">text-info</p>
<p class="text-danger">text-danger</p>

<p class="text-capitalize">hello world</p>
<p class="text-lowercase">hello world</p>
<p class="text-uppercase">hello world</p>

<p class="text-left">text-left</p>
<p class="text-right">text-right</p>
<p class="text-center">text-center</p>

테이블

<table class="table table-striped table-bordered table-hover">
    <thead>
    <tr>
        <th>aaa</th>
        <th>aaa</th>
        <th>aaa</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>bbb</td>
        <td>bbb</td>
        <td>bbb</td>
    </tr>
    <tr>
        <td>bbb</td>
        <td>bbb</td>
        <td>bbb</td>
    </tr>
    <tr>
        <td>bbb</td>
        <td>bbb</td>
        <td>bbb</td>
    </tr>
    </tbody>
</table>
```

```html

답글 남기기