border-info 類在 Bootstrap 4 中


在 Bootstrap 中使用 border-info 類來設定一個表示資訊的邊框。將其設定為像在 Bootstrap 中使用任何其他類一樣

<div class="one border border-info">
  Details
</div>

以上,我們添加了 border-info 類。另一個類 “one” 用於對 div 元素進行塑形 −

.one {
  width: 180px;
  height: 180px;
  margin: 55px;
}

可以嘗試執行以下程式碼,在一個矩形上實施 border-info 類 −

示例

現場演示

<!DOCTYPE html>
<html>
  <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>
   <style>
   .one {
     width: 180px;
     height: 180px;
     margin: 55px;
   }
   </style>
  </head>
<body>

<div class="container">
  <p>Rectangle with a border to set information:</p>
  <div class="one border border-info">Details</div>
</div>

</body>
</html>

更新日期: 15-6-2020

146 次瀏覽

開啟您的 職業生涯

完成課程獲得認證

開始使用
廣告
© . All rights reserved.