要在Bootstrap中设置不太重要的内容,请使用btn-outline-secondary类。
使用相同的类将轮廓应用于按钮,并应用绿色-
<button type="button" class="btn btn-outline-secondary"> Tools (Secondary Outline) </button>
上面,我将btn-outline-secondary类设置为在任何元素上设置的任何普通类,此处为按钮。
您可以尝试运行以下代码以了解如何设置灰色轮廓的Bootstrap按钮-
<!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> <h2>Web Tools</h2> <p>The following are the Tools:</p> <ul class = "list-group"> <li class = "list-group-item">JSON Editor</li> <li class = "list-group-item">XML Editor</li> </ul> <p>For more, click below:</p> <button type="button" class="btn btn-outline-secondary"> Tools (Secondary Outline)</button> </body> </html>