使用灰色輪廓 Bootstrap 4 按鈕設定不太重要的內容


要在 Bootstrap 中設定不太重要的內容,請使用 btn-outline-secondary 類。

在大綱中使用按鈕,並使用同一類應用綠色 −

<button type="button" class="btn btn-outline-secondary">
  Tools (Secondary Outline)
</button>

在上面,我已經將 btn-outline-secondary 類設定為對任何元素(此處為按鈕)設定的任何普通類。

您可以嘗試執行以下程式碼,以瞭解如何在設定灰色輪廓 Bootstrap 按鈕 -

示例

實際操作

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  </head>
<body>
  <h2>Web Tools</h2>
  <p>The following are the Tools:</p>
  <ul class = "list-group">
    <li class = "list-group-item">JSON Editor</li>
    <li class = "list-group-item">XML Editor</li>
  </ul>
  <p>For more, click below:</p>
  <button type="button" class="btn btn-outline-secondary"> Tools (Secondary Outline)</button>

</body>
</html>

更新於: 16-6-2020

61 次瀏覽

開啟你的 職業生涯

透過完成課程取得認證

開始
廣告
© . All rights reserved.