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

    จัดสไตล์ตามภาษาที่กำหนดในแอตทริบิวต์ lang ใช้ :lang(fr) เลือกองค์ประกอบที่มี lang="fr" (ภาษาฝรั่งเศส) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p:lang(fr) { background: green; /* ตัวอย่างเดิมเขียน greeb ผิด */ } </style> </head> &

  2. บทบาทของ CSS :last-of-type Selector

    ใช้ :last-of-type เพื่อจัดสไตล์ <p> ตัวสุดท้ายของ Parent (นับเฉพาะ Tag <p> เท่านั้น) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p:last-of-type { background: orange; } </style> </head> <body> <h2>H

  3. บทบาทของ CSS :last-child Selector

    ใช้ :last-child เพื่อจัดสไตล์ <p> ที่เป็นลูกคนสุดท้ายของ Parent ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p:last-child { background: orange; } </style> </head> <body> <p>This is demo text1.</p>

  4. การแปลง 3D รอบแกน Y ด้วย CSS3

    เมธอด rotateY() ใช้ rotateY(angle) หมุนองค์ประกอบรอบแกน Y (แนวตั้ง) ตัวอย่าง <html> <head> <style> div { width: 200px; height: 100px; background-color: pink; border: 1px solid black; } div#yDiv { -webkit-transform: rotateY(150deg);

  5. บทบาทของ CSS :empty Selector

    ใช้ :empty เพื่อจัดสไตล์ <p> ที่ไม่มีลูก (No children) รวมถึง Text Node ด้วย ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p.demo { width: 300px; height: 20px; background: gray; } p:empty { wid

  6. แปลงองค์ประกอบด้วยเมทริกซ์ 16 ค่าใน CSS3

    เมธอด matrix3d() ใช้ matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4) สำหรับการแปลง 3D ด้วยเมทริกซ์ 4x4 รูปแบบไวยากรณ์ matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4) a1..d3: ตัวเลขแทนการแปลงเชิงเส้น (linear transformation) a4, b4, c4: ตัวเลขแทนการย้

  7. จัดสไตล์ p ที่ไม่มีลูกด้วย CSS

    Pseudo-class :empty ใช้ :empty เลือกองค์ประกอบที่ไม่มีเนื้อหาใดๆ เลย (รวม text node ด้วย) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p.demo { width: 300px; height: 20px; background: gray; } p:empty { width: 150px; height: 20px;

  8. บทบาทของ CSS :enabled Selector

    ใช้ :enabled เพื่อจัดสไตล์ <input> ทุกตัวที่เปิดใช้งานอยู่ (ไม่มี attribute disabled) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:enabled { background: blue; } </style> </head> <body> <form action=>

  9. CSS position: absolute

    ตำแหน่งสัมพัทธ์กับพาเรนต์ที่มี position position: absolute นำองค์ประกอบออกจาก normal flow และจัดตำแหน่งเทียบกับ ancestor ใกล้ที่สุดที่มี position ไม่ใช่ static ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div.one { position: relative; width: 500px;

  10. บทบาทของ CSS :first-child Selector

    เลือกองค์ประกอบที่เป็นลูกคนแรกของพาเรนต์ :first-child เลือกองค์ประกอบที่เป็นลูกคนแรกของพาเรนต์ ไม่สนใจชนิดขององค์ประกอบ ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p:first-child { background-color: orange; } </style> </head> <body> &l

  11. บทบาทของ CSS :first-of-type Selector

    ใช้ :first-of-type เพื่อจัดสไตล์ <p> ตัวแรกของ Parent (นับเฉพาะ Tag <p> เท่านั้น) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p:first-of-type { background: orange; } </style> </head> <body> <p>This

  12. CSS Descendant Selector (space)

    เลือกหลานทุกระดับ ใช้ div p (เว้นวรรค) เพื่อเลือก <p> ทุกตัวที่อยู่ภายใน <div> ไม่ว่าจะลึกแค่ไหน ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div p { background-color: orange; } </style> </head> <body> <div> <p

  13. CSS Selector คืออะไร

    รูปแบบการเลือกองค์ประกอบใน CSS Selector คือรูปแบบ (pattern) ที่ใช้เลือกองค์ประกอบ HTML เพื่อนำไปจัดสไตล์ Selector หลักๆ Selector ตัวอย่าง คำอธิบาย .class .demo เลือกทุกองค์ประกอบที่มี class="demo" #id #myid

  14. การใช้งาน CSS :focus Pseudo-class

    ใช้ :focus เพื่อจัดสไตล์ Element ที่กำลังได้รับ Focus (เช่น Input ที่กำลังพิมพ์อยู่) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:focus { background-color: orange; } </style> </head> <body> <form action=>

  15. บทบาทของ CSS :active Selector

    ใช้ CSS Pseudo-class :active เพื่อจัดสไตล์ Link ขณะที่กำลังถูกคลิก (กดเมาส์ค้างอยู่) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> a:active { background-color: orange; } </style> </head> <body> <a href=https://qrie

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