Bootstrap으로 SMS 스타일 화면 만들기

10408 단어 bootstrap4
Bootstrap으로 SMS 스타일 화면 만들기

화면





html



index.html
<!doctype html>
<html lang="en">
  <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">
    <!-- https://material.io/ -->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <!-- https://qiita.com/nabettu/items/1593af04e48444c45c53 -->
    <style type="text/css">
      button {
        background-color: transparent;
        border: none;
        cursor: pointer;
        outline: none;
        padding: 0;
        appearance: none;
      }
    </style>
    <title>Talk</title>
  </head>
  <body>
    <nav class="navbar navbar-expand-sm bg-dark navbar-dark sticky-top">
      <a class="navbar-brand" href="#">
        <i class="material-icons text-light mt-2">chevron_left</i>
      </a>
    </nav>
    <main class="mt-2 mb-2">
      <div class="container">
        <div class="row mb-2">
          <div class="col-9">
            <div class="card bg-light">
              <div class="card-body">
                <p class="card-text">Some text inside the first card</p>
              </div>
            </div>
          </div>
          <div class="col-3"></div>
        </div>
        <div class="row mb-2">
          <div class="col-3"></div>
          <div class="col-9">
            <div class="card bg-light">
              <div class="card-body">
                <p class="card-text">Some text inside the first card</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </main>
    <footer class="fixed-bottom p-1 bg-light">
      <div class="container">
        <form>
          <div class="form-row">
            <div class="col-auto">
              <i class="material-icons mt-2">add</i>
              <i class="material-icons mt-2">mic</i>
              <i class="material-icons mt-2">camera_alt</i>
            </div>
            <div class="col">
              <input type="text" class="form-control" placeholder="Aa">
            </div>
            <div class="col-auto">
              <button type="submit">
                <i class="material-icons text-primary mt-2">send</i>
              </button>
            </div>
          </div>
        </form>
      </div>
    </footer>
    <!-- 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>

참고

좋은 웹페이지 즐겨찾기