使用Bootstrap中的.checkbox类,使用Bootstrap将复选框添加到网页中
您可以尝试运行以下代码来设置复选框的容器-
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <div class = "container"> <h2>Programming Survey</h2> <p>Which programming languages do you like?</p> <form> <div class = "checkbox"> <label><input type = "checkbox" value = " ">Java</label> </div> <div class = "checkbox"> <label><input type = "checkbox" value="">C++</label> </div> <div class = "checkbox"> <label><input type = "checkbox" value="">C</label> </div> </form> </div> </body> </html>