【Bootstrap4】Bootstrap 4 ~ ボタン / アイコン 編 ~


■ サンプル

<!doctype html>
<html lang="jp">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">

    <title>Hello, world!</title>
  </head>
  <body>
    <!-- アイコン -->
    <i class="fa fa-trash-alt"></i><br>
    <i class="fa fa-pencil-alt"><br>
    <br>
    <!-- ボタン -->
    <a class="btn" href="#">Default</a><br>
    <a class="btn btn-primary" href="#">Primary</a><br>
    <a class="btn btn-info" href="#"><i class="glyphicon glyphicon-info-sign"></i> Info</a><br>
    <div class="btn-group">
      <a class="btn btn-success" href="#">Success</a>
      <a class="btn btn-warning" href="#">Warning</a>
      <a class="btn btn-danger" href="#">Danger</a>
    </div>
    <br>
    <button type="button" class="btn btn-dark rounded-circle shadow"><i class="fa fa-trash-alt mt-0"></i></button><br>
    <button type="button" class="btn btn-outline-primary btn-sm rounded-circle shadow-lg"><i class="fa fa-pencil-alt mt-0"></i></button><br>

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  </body>
</html>

関連記事

Bootstrap 4 ~ 入門編 ~

https://blogs.yahoo.co.jp/dk521123/28015251.html

アイコン を 表示する ~ Font Awesome

https://blogs.yahoo.co.jp/dk521123/35506135.html