在 Bootstrap 中建立一個指示警示的黃色警報框


要建立一個黃色警報框指示警告操作,使用 alert-warning 類。

要實現 alert-warning 類,你需要嘗試執行以下程式碼

示例

即時示例

<!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 = "alert alert-info">
         <p>Indicates a positive action!</p>
      </div>
      <div class = "alert alert-warning">
         <p>Indicates warning!</p>
      </div>
   </body>
</html>

更新於: 12-6 月 - 2020

528 瀏覽

開啟你 職業生涯

完成課程並獲得認證

開始
廣告