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

    จัดสไตล์อินพุตที่ค่านอกช่วง ใช้ :out-of-range สำหรับ <input type="number"> ที่มี min/max และค่าที่ป้อนอยู่นอกช่วง ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:out-of-range { border: 3px dashed orange; background: yellow; } <

  2. บทบาทของ CSS :read-only Selector

    ใช้ :read-only เพื่อเลือก Element ที่เป็น Read-only (ไม่สามารถแก้ไขได้ เช่น Input ที่มี Attribute readonly) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:read-only { background-color: blue; color: white; } </style>

  3. บทบาทของ CSS :read-write Selector

    เลือกองค์ประกอบที่อ่าน-เขียนได้ :read-write เลือก <input> หรือ <textarea> ที่ไม่มี readonly และไม่ disabled ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:read-write { background-color: blue; color: white; } </style> </head&

  4. บทบาทของ CSS :link Selector

    ใช้ :link เพื่อจัดสไตล์ Link ที่ยังไม่เคยถูกเยี่ยมชม (Unvisited Links) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> a:link { background-color: orange; } </style> </head> <body> <a href=https://www.example.com>D

  5. บทบาทของ CSS :not(selector) Selector

    เลือกทุกอย่างยกเว้น selector ที่ระบุ ใช้ :not(selector) เพื่อเลือกองค์ประกอบที่ ไม่ตรงกับ selector ภายในวงเล็บ ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p { color: red; } :not(p) { color: blue; } </style> </head> <body> <h1>Heading

  6. บทบาทของ CSS :nth-child(n) Selector

    ใช้ :nth-child(n) เพื่อจัดสไตล์ <p> ตัวที่ n ของ Parent (นับลูกทุกประเภท) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p:nth-child(4) { background: orange; color: white; } </style> </head> <body> &l

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

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

  8. บทบาทของ CSS :nth-of-type(n) Selector

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

  9. เมธอดการแปลง 3D ใน CSS3

    ตารางสรุปเมธอด 3D Transforms เมธอด คำอธิบาย matrix3d(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n)แปลงด้วยเมทริกซ์ 16 ค่า translate3d(x,y,z)ย้ายตามแกน X, Y, Z translateX(x)ย้ายตามแกน X translateY(y)ย้ายตามแกน Y translateZ(z)ย้ายตามแกน Z scaleX(x)ขยาย/ย่อตา

  10. จัดสไตล์ลิงก์เมื่อ hover ด้วย CSS

    Pseudo-class :hover ใช้ :hover จัดสไตล์ลิงก์เมื่อเลื่อนเมาส์มาวางเหนือ ตัวอย่าง <!DOCTYPE html> <html> <head> <style> a:hover { background-color: orange; } </style> </head> <body> <a href="https://www.google.com">Google&l

  11. บทบาทของ CSS :in-range Selector

    ใช้ :in-range เพื่อจัดสไตล์ <input type=number> ที่มีค่าอยู่ในช่วงที่กำหนด (min ถึง max) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:in-range { border: 3px dashed orange; background: yellow; } </style> </

  12. บทบาทของ CSS :invalid Selector

    ใช้ :invalid เพื่อจัดสไตล์ <input> ที่มีค่าไม่ถูกต้องตามประเภท (เช่น Email format ผิด) ตัวอย่าง <!DOCTYPE html> <html> <head> <style> input:invalid { background: red; } </style> </head> <body> <h2>Heading&l

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