暗灰色輪廓 Bootstrap 4 按鈕


要將深灰色邊框應用到一個按鈕,請使用 btn-outline-dark 類。

包含 brn-outline-dark 類,就像將任何其他類新增到元素一樣。此處,我們有 button 元素,因為我們想要為按鈕新增深灰色邊框

<button type="button" class="btn btn-outline-dark">
  Dark gray outline
</button>

我們來看一個在 Bootstrap 中實現 btn-outline-dark 類的示例 −

示例

線上演示

<!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>
  <div class="container">
    <h4>Bootstrap 4</h4>
    <p>Learning  btn-outline-dark class usage:</p>
    <button type="button" class="btn btn-outline-dark">Dark gray outline</button>
  </div>
</body>
</html>

更新日期:2020 年 6 月 16 日

262 次觀看

開啟您的 職業生涯

完成課程後即可獲得認證

開始
廣告