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-06-17

135 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.