Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

Bootstrap Button Group Classes: จัดกลุ่มปุ่ม


ใช้คลาส .btn-group เพื่อจัดกลุ่มปุ่มใน 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> 
    <p>The following are the buttons:</p> 
    <div class = "btn-group"> 
      <button type = "button" class = "btn btn-default">A</button> 
      <button type = "button" class = "btn btn-default">B</button> 
      <button type = "button" class = "btn btn-default">C</button> 
    </div> 
  </body> 
</html>