使用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://cdn.staticfile.org/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>