- 1.<h1> - <h6> ใน Bootstrap 4 รูปแบบส่วนหัวของ HTML (<h1> - <h6>) มีน้ำหนักตัวอักษร (font-weight) ที่โดดเด่นมากขึ้นและมีการเพิ่มขนาดตัวอักษร (font-size) ขึ้น
ผลลัพธ์ 2.Display Headings จะมี font-size ที่ใหญ่และ font-weight ที่เบา Display Headings มี Class มาให้เลือก 4 Class ด้วยกัน คือ .display-1, .display-2, .display-3, .display-4
โค้ด: เลือกทั้งหมด
<!DOCTYPE html> <html lang="en"> <head> <title>ทดสอบการใช้งานเเท็ก h1-h6</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.0.0-beta.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h1>ขนาดตัวอักษรของ h1 (2.5rem = 40px)</h1> <h2>ขนาดตัวอักษรของ h2 (2rem = 32px)</h2> <h3>ขนาดตัวอักษรของ h3 (1.75rem = 28px)</h3> <h4>ขนาดตัวอักษรของ h4 (1.5rem = 24px)</h4> <h5>ขนาดตัวอักษรของ h5 (1.25rem = 20px)</h5> <h6>ขนาดตัวอักษรของ h6 (1rem = 16px)</h6> </div> </body> </html>
ตัวอย่างผลลัพธ์ อ้างอิง : https://www.w3schools.com/bootstrap4/bo ... graphy.aspโค้ด: เลือกทั้งหมด
<!DOCTYPE html> <html lang="en"> <head> <title>ทดสอบการใช้งาน Display Headings</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.0.0-beta.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h1>ทดสอบการใช้งาน Display Headings</h1> <hr> <h1 class="display-1">รูปแบบของ Display 1</h1> <h1 class="display-2">รูปแบบของ Display 2</h1> <h1 class="display-3">รูปแบบของ Display 3</h1> <h1 class="display-4">รูปแบบของ Display 4</h1> </div> </body> </html>
การใช้งาน Text/Typography ใน Bootstrap 4
Moderator: mindphp, ผู้ดูแลกระดาน
-
- PHP VIP Members
- โพสต์: 4859
- ลงทะเบียนเมื่อ: 08/01/2018 10:03 am
การใช้งาน Text/Typography ใน Bootstrap 4
Bootstrap 4 ใช้ font-size เริ่มต้นขนาด 16px และ line-height คือ 1.5 ใช้ font-family คือ "Helvetica Neue", "Helvetica", "Arial", "sans-serif" นอกจากนี้องค์ประกอบทั้งหมดของ <p> มี margin-top: 0 และ margin-bottom: 1rem (ค่าเริ่มต้น 16px ) มาดูการใช้งานของแท็กต่างๆดั่งนี้
Live Simply, Laugh Often, Love Deeply.....
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
- 0 ตอบกลับ
- 946 แสดง
-
โพสต์ล่าสุด โดย moomai
01/02/2017 5:11 pm
-
-
โพสต์ใหม่ แนะนำการใช้ Typography ใน bootstrap 5
โดย Thanapoom1514 » 08/11/2022 5:27 pm » ใน Booststap Knowledge - 0 ตอบกลับ
- 824 แสดง
-
โพสต์ล่าสุด โดย Thanapoom1514
08/11/2022 5:27 pm
-
-
-
โพสต์ใหม่ การออกแบบตัวอักษร (Typography) และการแสดงประโยคของ Bootstrap
โดย m038 » 01/08/2016 6:49 pm » ใน Booststap Knowledge - 0 ตอบกลับ
- 1054 แสดง
-
โพสต์ล่าสุด โดย m038
01/08/2016 6:49 pm
-
-
- 0 ตอบกลับ
- 4035 แสดง
-
โพสต์ล่าสุด โดย GoB
05/03/2015 11:17 am
-
-
โพสต์ใหม่ การใช้ Grid ใน Bootstrap ให้เรียงซ้อนในแนวนอน
โดย Panchalee » 01/11/2017 11:20 am » ใน Booststap Knowledge - 0 ตอบกลับ
- 2595 แสดง
-
โพสต์ล่าสุด โดย Panchalee
01/11/2017 11:20 am
-
-
-
โพสต์ใหม่ การใช้ Closing Alerts ใน Bootstrap
โดย Parichat » 11/01/2018 2:57 pm » ใน Booststap Knowledge - 0 ตอบกลับ
- 2820 แสดง
-
โพสต์ล่าสุด โดย Parichat
11/01/2018 2:57 pm
-
-
-
โพสต์ใหม่ การใช้ Yii Booster ext กับการโหลด bootstrap มาใช้แบบแยก
โดย sarapmax » 09/06/2014 7:32 pm » ใน Programming - PHP - 0 ตอบกลับ
- 1278 แสดง
-
โพสต์ล่าสุด โดย sarapmax
09/06/2014 7:32 pm
-
-
-
โพสต์ใหม่ การใช้ icon ไอคอน ใน bootstrap บูส แตร๊ป
โดย sonram » 12/07/2016 5:46 pm » ใน Booststap Knowledge - 0 ตอบกลับ
- 2544 แสดง
-
โพสต์ล่าสุด โดย sonram
12/07/2016 5:46 pm
-
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 4