要将深灰色轮廓边框设置为按钮,请使用btn-outline-dark类。
包括brn-outline-dark类,就像您将其他任何类添加到元素一样。在这里,我们有了button元素,因为我们希望按钮具有深灰色的轮廓:
<button type="button" class="btn btn-outline-dark"> Dark gray outline </button>
让我们看一下在Bootstrap中实现btn-outline-dark类的示例-
<!DOCTYPE html> <html lang="en"> <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> </head> <body> <div class="container"> <h4>Bootstrap 4</h4> <p>Learning btn-outline-dark class usage:</p> <button type="button" class="btn btn-outline-dark">Dark gray outline</button> </div> </body> </html>