Bootstrap 4 บทช่วยสอน

BS4 HOME BS4 เริ่มต้น BS4 คอนเทนเนอร์ BS4 Grid Basic BS4 วิชาการพิมพ์ BS4 สี ตาราง BS4 BS4 รูปภาพ BS4 Jumbotron การแจ้งเตือน BS4 ปุ่ม BS4 กลุ่มปุ่ม BS4 ป้าย BS4 แถบความคืบหน้า BS4 BS4 Spinners BS4 การแบ่งหน้า BS4 รายการกลุ่ม การ์ด BS4 BS4 ดรอปดาวน์ BS4 ยุบ BS4 Navs BS4 Navbar แบบฟอร์ม BS4 อินพุต BS4 กลุ่มอินพุต BS4 BS4 แบบฟอร์มที่กำหนดเอง BS4 ม้าหมุน BS4 โมดอล เคล็ดลับเครื่องมือ BS4 BS4 ป๊อปโอเวอร์ BS4 ขนมปังปิ้ง BS4 Scrollspy BS4 ยูทิลิตี้ BS4 Flex ไอคอน BS4 วัตถุสื่อ BS4 ตัวกรอง BS4

Bootstrap 4 Grid

ระบบกริด BS4 BS4 ซ้อน/แนวนอน BS4 Grid XSmall BS4 กริดขนาดเล็ก BS4 กริดขนาดกลาง BS4 กริดขนาดใหญ่ BS4 Grid XLarge ตัวอย่างกริด BS4

Bootstrap 4 อื่นๆ

เทมเพลตพื้นฐาน BS4 แบบฝึกหัด BS4 แบบทดสอบ BS4

Bootstrap 4 อ้างอิง

ทุกชั้นเรียน JS Alert ปุ่ม JS JS Carousel JS ยุบ JS Dropdown JS Modal JS Popover JS Scrollspy JS แท็บ JS Toasts JS Tooltip


Bootstrap 4 ข้อความ/ตัวอักษร


Bootstrap 4 การตั้งค่าเริ่มต้น

Bootstrap 4 ใช้ค่าเริ่มต้น font-size16px และ line-heightเป็น 1.5

ค่าเริ่มต้นfont-familyคือ "Helvetica Neue", Helvetica, Arial, sans-serif

นอกจากนี้<p>องค์ประกอบทั้งหมดมี margin-top: 0และmargin-bottom: 1rem(16px โดยค่าเริ่มต้น)


<h1> - <h6>

Bootstrap 4 สไตล์ HTML ส่วนหัว ( <h1>ถึง <h6>) พร้อมฟอนต์น้ำหนักที่โดดเด่นยิ่งขึ้นและขนาดฟอนต์ที่เพิ่มขึ้น:

ตัวอย่าง

h1 Bootstrap heading (2.5rem = 40px)

h2 Bootstrap heading (2rem = 32px)

h3 Bootstrap heading (1.75rem = 28px)

h4 Bootstrap heading (1.5rem = 24px)

h5 Bootstrap heading (1.25rem = 20px)
h6 Bootstrap heading (1rem = 16px)

แสดงหัวข้อ

ส่วนหัวที่แสดงใช้เพื่อให้โดดเด่นกว่าส่วนหัวปกติ (ขนาดฟอนต์ที่ใหญ่กว่าและน้ำหนักฟอนต์ที่เบากว่า) และมีสี่คลาสให้เลือก: .display-1, .display-2, .display-3,.display-4

ตัวอย่าง

Display 1

Display 2

Display 3

Display 4


<เล็ก>

ใน Bootstrap 4 <small>องค์ประกอบ HTML ถูกใช้เพื่อสร้างข้อความรองที่เบากว่าในหัวข้อใด ๆ :

ตัวอย่าง

h1 heading secondary text

h2 heading secondary text

h3 heading secondary text

h4 heading secondary text

h5 heading secondary text
h6 heading secondary text


<mark>

Bootstrap 4 จะจัดรูปแบบองค์ประกอบ HTML <mark>ด้วยสีพื้นหลังสีเหลืองและช่องว่างภายในบางส่วน:

ตัวอย่าง

Use the mark element to highlight text.


<abbr>

Bootstrap 4 จะจัดรูปแบบองค์ประกอบ HTML <abbr>ด้วยเส้นขอบจุดด้านล่าง:

ตัวอย่าง

The WHO was founded in 1948.


<blockquote>

เพิ่ม.blockquoteคลาสไปที่ a <blockquote> เมื่ออ้างอิงบล็อคของเนื้อหาจากแหล่งอื่น:

ตัวอย่าง

For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.


From WWF's website

<dl>

Bootstrap 4 จะจัดรูปแบบ<dl>องค์ประกอบ HTML ในลักษณะต่อไปนี้:

ตัวอย่าง

Coffee
- black hot drink
Milk
- white cold drink

<code>

Bootstrap 4 จะจัดรูปแบบ<code>องค์ประกอบ HTML ในลักษณะต่อไปนี้:

ตัวอย่าง

The following HTML elements: span, section, and div defines a section in a document.


<kbd>

Bootstrap 4 จะจัดรูปแบบ<kbd>องค์ประกอบ HTML ในลักษณะต่อไปนี้:

ตัวอย่าง

Use ctrl + p to open the Print dialog box.


<pre>

Bootstrap 4 จะจัดรูปแบบ<pre>องค์ประกอบ HTML ในลักษณะต่อไปนี้:

ตัวอย่าง

Text in a pre element
is displayed in a fixed-width
font, and it preserves
both      spaces and
line breaks.

ชั้นเรียนวิชาการพิมพ์เพิ่มเติม

คุณสามารถเพิ่มคลาส Bootstrap 4 ด้านล่างให้กับองค์ประกอบ HTML สไตล์เพิ่มเติม:

Class Description Example
.font-weight-bold Bold text
.font-weight-bolder Bolder text
.font-italic Italic text
.font-weight-light Light weight text
.font-weight-lighter Lighter weight text
.font-weight-normal Normal text
.lead Makes a paragraph stand out
.small Indicates smaller text (set to 80% of the size of the parent)
.text-left Indicates left-aligned text
.text-*-left Indicates left-aligned text on small, medium, large or xlarge screens
.text-break Prevents long text from breaking layout
.text-center Indicates center-aligned text
.text-*-center Indicates center-aligned text on small, medium, large or xlarge screens
.text-decoration-none Removes the underline from a link
.text-right Indicates right-aligned text
.text-*-right Indicates right-aligned text on small, medium, large or xlarge screens
.text-justify Indicates justified text
.text-monospace Monospaced text
.text-nowrap Indicates no wrap text
.text-lowercase Indicates lowercased text
.text-reset Resets the color of a text or a link (inherits the color from its parent)
.text-uppercase Indicates uppercased text
.text-capitalize Indicates capitalized text
.initialism Displays the text inside an <abbr> element in a slightly smaller font size
.list-unstyled Removes the default list-style and left margin on list items (works on both <ul> and <ol>). This class only applies to immediate children list items (to remove the default list-style from any nested lists, apply this class to any nested lists as well)
.list-inline Places all list items on a single line (used together with .list-inline-item on each <li> elements)
.pre-scrollable Makes a <pre> element scrollable

อ้างอิง Bootstrap 4 CSS ที่สมบูรณ์

สำหรับการอ้างอิงที่สมบูรณ์ของคลาส CSS ทั้งหมดที่มีอยู่ใน Bootstrap 4 ไปที่ Bootstrap 4 All Classes Referenceของเรา