Bootstrap 4 按鈕 .btn-outline-light 類


在 Bootstrap 4 中使用 btn-outline-light 類設定淺灰色邊框按鈕。

要在網頁中包含它,請在 <button> 元素中將其設定成一個類,如下面的程式碼片段所示 −

<button type="button" class="btn btn-outline-light">

讓我們看一個實現 btn-outline-light 類的示例 −

示例

線上演示

<!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>Demo Button</h2>
  <p>Below is a light grayed outline button:</p>
  <button type="button" class="btn btn-outline-light">
    Sample
  </button>
</body>
</html>

更新日期: 2020 年 6 月 17 日

135 次瀏覽

開啟你的 職業

透過完成課程獲得認證

立即開始
廣告
© . All rights reserved.