Bootstrap 4 中的 border-info 类

bootstrapweb developmentcss framework

使用 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>

相关文章