在 Bootstrap 中建立一個紅色警告框,指示一項危險操作


使用 Bootstrap 中的 .alert-danger 類建立一個紅色警告框,表明危險操作。

你可以嘗試執行以下程式碼來實現 .alert-danger 類——

示例

線上動態演示

<!DOCTYPE html>
<html>
   <head>
   <title>Bootstrap Example</title>
      <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/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.1/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "container">
         <div class = "alert alert-danger">
            <p>Danger!</p>
            <p>Add dangerous action here...</p>
         </div>
     </div>
   </body>
</html>

更新於:2020-6-15

678 次瀏覽

開啟您的 職業發展之旅

完成課程,獲得認證

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