Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS
CSS
  1. บทบาทของ CSS :checked Selector

    ใช้ CSS Pseudo-class :checked เพื่อจัดสไตล์ <input> ทุกตัวที่ถูกเลือก (Checked) เช่น Checkbox, Radio button ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:checked { height: 20px; width: 20px; } </style> </he

  2. CSS position: fixed

    ตำแหน่งคงที่เทียบกับ viewport position: fixed ทำให้องค์ประกอบอยู่ตำแหน่งเดิมบนหน้าจอแม้จะเลื่อนสกรอลล์ ใช้ top, right, bottom, left กำหนดตำแหน่ง ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { position: fixed; bottom: 0; right: 0; width: 20

  3. บทบาทของ CSS :disabled Selector

    จัดสไตล์อินพุตที่ปิดใช้งาน ใช้ :disabled selector เพื่อจัดสไตล์ <input> ที่มีแอตทริบิวต์ disabled ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:enabled { background: blue; } input:disabled { background: red; } </style> </head> <body>

  4. CSS overflow: visible

    แสดงเนื้อหาที่ล้น (ค่าเริ่มต้น) overflow: visible ไม่ตัดเนื้อหา เนื้อหาจะล้นออกมานอกกล่อง นี่คือค่าเริ่มต้น ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { background-color: orange; width: 250px; height: 30px; border: 2px solid blue;

  5. CSS overflow: hidden

    ซ่อนเนื้อหาที่ล้น overflow: hidden ตัดเนื้อหาที่เกินพื้นที่ออกไป ไม่แสดง scrollbar ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { background-color: orange; width: 250px; height: 35px; border: 2px solid blue; overflow: hidden; }

  6. CSS overflow: scroll

    แสดง scrollbar ตลอดเวลา overflow: scroll ตัดเนื้อหาที่ล้นและแสดง scrollbar ทั้งแนวนอนและแนวตั้งตลอดเวลา ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { background-color: orange; width: 250px; height: 45px; border: 2px solid blue; over

  7. CSS overflow: auto

    แสดง scrollbar เมื่อจำเป็น overflow: auto จะเพิ่ม scrollbar ก็ต่อเมื่อเนื้อหาล้น ไม่เหมือน overflow: scroll ที่แสดงตลอดเวลา ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { background-color: orange; width: 250px; height: 45px; border: 2px so

  8. CSS overflow-y

    ควบคุมการล้นแนวตั้ง overflow-y จัดการเนื้อหาที่ล้นออกไปทางบน-ล่าง ค่าเหมือน overflow-x ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { background-color: orange; width: 250px; height: 45px; border: 2px solid blue; overflow-x: hidden;

  9. CSS overflow-x

    ควบคุมการล้นแนวนอน overflow-x จัดการเนื้อหาที่ล้นออกไปทางซ้าย-ขวา ค่า: visible, hidden, scroll, auto ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { background-color: orange; width: 250px; height: 45px; border: 2px solid blue; overflo

  10. จัดแนวองค์ประกอบด้วย CSS float

    คุณสมบัติ float ใช้ float: right หรือ float: left เพื่อจัดวางองค์ประกอบชิดขอบขวาหรือซ้าย เนื้อหาอื่นจะพับล้อมรอบ ตัวอย่าง <!DOCTYPE html> <html> <head> <style> .demo { float: right; width: 200px; border: 1px dashed blue; padding: 5px; } &l

  11. CSS Child Selector (>)

    เลือกเฉพาะลูกโดยตรง ใช้ p เพื่อเลือก <p> ที่เป็นลูกโดยตรงของ <div> ไม่รวมหลาน ตัวอย่าง p { background-color: orange; } </style> </head> <body> <div> <p>Para 1 in the div.</p> <!-- This is not a Child --> <span>&

  12. สร้างปุ่มลิงก์มีขอบด้วย CSS

    จัดสไตล์ลิงก์ให้ดูเหมือนปุ่ม ใช้ display: inline-block, padding, border และ pseudo-classes เพื่อสร้างปุ่มลิงก์ ตัวอย่าง <!DOCTYPE html> <html> <head> <style> a:link, a:visited { background-color: white; color: black; border: 1px solid blue; padd

Total 1584 -คอมพิวเตอร์  FirstPage PreviousPage NextPage LastPage CurrentPage:56/80  20-คอมพิวเตอร์/Page Goto:1 50 51 52 53 54 55 56 57 58 59 60 61 62