使用Bootstrap中的btn-outline-success类将绿色轮廓设置为按钮。
绿色按钮轮廓表明成功,您可以像这样设置按钮-
<button type="button" class="btn btn-outline-success"> Result </button>
上面我在<button>元素上设置了类,就像我们在HTML或Bootstrap中的任何其他元素上设置了类一样。
这是一个示例,用于学习如何在Bootstrap中使用btn-outline-success类-
<!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>Result</h2> <p>The following are the subjects:</p> <ul class = "list-group"> <li class = "list-group-item">Maths</li> <li class = "list-group-item">Digital Electronics</li> </ul> <p>For result, click below:</p> <button type="button" class="btn btn-outline-success">Result</button> </body> </html>