使用 Bootstrap 4 中的红色轮廓按钮指示危险

bootstrapweb developmentcss framework更新于 2024/1/14 11:56:17

使用 Bootstrap 4 中的 btn-outline-danger 类,使用红色轮廓按钮指示危险。

以下示例设置了一个使用红色轮廓指示危险的按钮 −

<button type="button" class="btn btn-outline-danger">
  Danger
</button>

使用 Bootstrap 中的 btn 和 btn-outline-danger 类添加该类 −

class="btn btn-outline-danger”

让我们看一个实现 btn-outline-danger 类的示例 −

示例

<!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>Animals</h2>
  <p>Animals are in danger. To know what, you need to click below:</p>
  <button type="button" class="btn btn-outline-danger">Danger</button>

</body>
</html>

相关文章