เพื่อล้าง float ขององค์ประกอบ ให้ใช้คลาส .clearfix ของ Bootstrap ตัวอย่าง ลองรันโค้ดด้านล่างเพื่อดูการทำงานของ clearfix <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstra
เพื่อล้าง float ขององค์ประกอบ ให้ใช้คลาส .clearfix ของ Bootstrap ตัวอย่าง ลองรันโค้ดด้านล่างเพื่อดูการทำงานของ clearfix <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstra
คุณสมบัติ marker-offset ช่วยให้คุณระบุระยะห่างระหว่างเครื่องหมาย (bullet/number) และข้อความที่เกี่ยวข้องกับเครื่องหมายนั้นได้ ตัวอย่าง ลองรันโค้ดด้านล่างเพื่อทดสอบคุณสมบัติ marker-offset <html> <head> </head> <body>
เพื่อตั้งค่าเครื่องหมายรายการ (bullet/number) ให้อยู่ในกล่องที่ครอบเนื้อหา ให้ใช้คุณสมบัติ list-style-position กับค่า inside ค่า inside หมายถึง เมื่อข้อความยาวเกินบรรทัด ข้อความจะหุ้มลงใต้เครื่องหมาย และจะเว้นวรรคชิดกับตำแหน่งที่ข้อความจะเริ่มต้นหากใช้ค่า outside ตัวอย่าง <html>  
เพื่อตั้งค่าเครื่องหมายรายการ (bullet/number) ให้อยู่นอกกล่องที่ครอบเนื้อหา ให้ใช้คุณสมบัติ list-style-position กับค่า outside ตัวอย่าง ค่า outside หมายถึง เมื่อข้อความยาวเกินบรรทัด ข้อความบรรทัดที่สองจะจัดตำแหน่งชิดกับจุดเริ่มต้นของบรรทัดแรก <html> <head> <
บทนำ Property list-style-position กำหนดตำแหน่งของเครื่องหมายรายการ (bullet/number) เทียบกับ content box ของ list item ค่าที่ใช้ได้ ค่าคำอธิบายพฤติกรรมเมื่อข้อความยาวหลายบรรทัด outsideค่าเริ่มต้น เครื่องหมายนอก content boxข้อความบรรทัดที่ 2+ จัดชิดกับบรรทัดแรก (ไม่ลอยใต้ bullet) insideเครื่อง
บทนำ Property list-style-image ใช้กำหนดรูปภาพเป็นเครื่องหมายรายการ (bullet) แทนจุดหรือตัวเลขปกติ ตัวอย่างโค้ด <html> <head></head> <body> <ul> <li style=list-style-image: url(/images/bullet.gif);>Karnataka</li> <li>Hyderabad</li> <
บทนำ CSS linear-gradient() สามารถสร้างไล่สีสีรุ้งได้โดยระบุสีหลายสีเรียงติดกัน ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> #demo { height: 100px; background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet); } </st
บทนำ LCM (Least Common Multiple) หรือ ค่าต่ำสุดร่วม คือ จำนวนเต็มบวกที่น้อยที่สุดที่หารด้วยทุกตัวเลขในชุดได้ลงตัว ตัวอย่าง LCM ของ 3 และ 4: จำนวนคูณของ 3 = 3,6,9,12,15... จำนวนคูณของ 4 = 4,8,12,16... → LCM = 12 LCM ของอาร์เรย์ {25, 50, 125, 625} = 625 โปรแกรม Java public class LCMofArrayOfNu
บทนำ Property margin-top ระบุระยะห่างด้านบนของ element ใช้ค่าได้เหมือน margin-bottom: length, percentage, auto ตัวอย่างโค้ด <html> <head></head> <body> <p style=margin-top: 10px; border:2px solid red;> This is a paragraph with a specified top margin. </p>
บทนำ Property margin-bottom ระบุระยะห่างด้านล่างของ element คล้ายกับ margin-top แต่เป็นด้านล่าง ตัวอย่างโค้ด <html> <head></head> <body> <p style=margin-bottom: 20px; border:2px solid red;> This is a paragraph with a specified bottom margin. </p> <p
บทนำ Property margin-bottom ใช้กำหนดระยะห่างด้านล่างของ element ระหว่าง element นั้นกับ element ถัดไป สามารถระบุเป็นความยาว (px, em, rem) เปอร์เซ็นต์ หรือ auto ตัวอย่างโค้ด <html> <head></head> <body> <p style=margin-bottom: 40px; border:2px solid yellow;> Cricke
คุณสมบัติ list-style-type สำหรับ ordered list คุณสมบัติ list-style-type ให้คุณควบคุมรูปทรงหรือสไตล์ของตัวอักษรลำดับในรายการมีลำดับ (ordered lists) ตัวอย่าง <html> <head> </head> <body> <ol style=list-style-type:decimal;> <li>India</li>
คุณสมบัติ list-style-type คุณสมบัติ list-style-type ให้คุณควบคุมรูปทรงหรือลักษณะของ marker ลองรันโค้ดต่อไปนี้เพื่อนำ list-style-type property ไปใช้: ตัวอย่าง <html> <head> </head> <body> <ul style=list-style-type:circle;> <li>India</li>
คุณสมบัติ list-style-type คุณสมบัติ list-style-type ให้คุณควบคุมรูปทรงหรือลักษณะของ marker ลองรันโค้ดต่อไปนี้เพื่อนำ list-style-type property ไปใช้สำหรับ unordered list: ตัวอย่าง <html> <head> </head> <body> <ul style=list-style-type:circle;> <li>
คุณสมบัติ list-style-position คุณสมบัติ list-style-position บ่งชี้ว่า marker ควรปรากฏภายในหรือภายนอกกล่องที่มี bullet points รับค่าได้ 2 ค่า: ค่า คำอธิบาย none N/A inside หากข้อความขึ้นบรรทัดใหม่ ข้อความจะ wrap อยู่ใต้ marker จะย่อหน้าเข้ามาที่ตำแหน่งที่ข้อความจะเริ่มต้นหาก list มีค่า outs
คุณสมบัติ list-style-type คุณสมบัติ list-style-type ให้คุณควบคุมรูปหรือสไตล์ของ marker รายการไม่มีลำดับ (unordered lists) ตัวอย่าง <html> <head> </head> <body> <ul style=list-style-type:square;> <li>India</li> <li>UK</li>
คุณสมบัติ list-style-image คุณสมบัติ list-style-image ให้คุณระบุภาพเพื่อใช้เป็น bullet style ของตัวเอง ตัวอย่าง ลองรันโค้ดต่อไปนี้เพื่อกำหนดภาพสำหรับ bullet ด้วย CSS: <html> <head> </head> <body> <ul style=list-style-image: url(/images/bullet.gif);> <
คุณสมบัติ list-style (Shorthand) คุณสมบัติ list-style ให้คุณระบุคุณสมบัติรายการทั้งหมดในนิพจน์เดียว ตัวอย่าง ลองรันโค้ดต่อไปนี้เพื่อแสดงคุณสมบัติทั้งหมดเช่น list-style, type ฯลฯ ในบรรทัดเดียว: <html> <head> </head> <body> <ul style=list-style: inside circle;>
คุณสมบัติ border-style: double ใช้คุณสมบัติ border-style ด้วยค่า double เพื่อกำหนดขอบสองเส้น ลองรันโค้ดต่อไปนี้เพื่อนำ border-style property ไปใช้: ตัวอย่าง <html> <head> </head> <body> <p style=border-width:4px; border-style:none;> This is a border wit
คุณสมบัติ border-left-width คุณสมบัติ border-left-width ใช้เปลี่ยนความกว้างของขอบซ้าย ลองรันโค้ดต่อไปนี้เพื่อนำ border-left-width property ไปใช้: ตัวอย่าง <html> <head> </head> <body> <p style=border-left-width:6px; border-style:solid;> This is demo con