Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS
CSS
  1. วิธีแก้ไขเมื่อเนื้อหาของอีเลเมนต์ใหญ่กว่าพื้นที่ที่จัดสรร

    ใช้คุณสมบัติ CSS overflow เพื่อแก้ไขปัญหาเนื้อหาที่ล้นออกนอกพื้นที่ที่กำหนด คุณสามารถลองรันโค้ดตัวอย่างต่อไปนี้:ตัวอย่าง<html>    <head>    </head>    <style>       .scroll{          display:block;   &

  2. ค่าของ CSS Overflow Property

    คุณสมบัติ overflow ใน CSS บอกเบราว์เซอร์ว่าทำอย่างไรเมื่อเนื้อหาใน Box ใหญ่กว่า Box เอง ค่า (Value)คำอธิบาย (Description) visibleเนื้อหาล้นออกนอกขอบ Element (ค่าเริ่มต้น) hiddenตัดเนื้อหาที่ล้นออก ไม่แสดง Scrollbar scrollแสดง Scrollbar เสมอ แม้เนื้อหาจะไม่ล้นก็ตาม autoแสดง Scrollbar เฉพาะเมื่อเน

  3. ซ่อน Element ออกจากมุมมองด้วย CSS

    เพื่อซ่อน Element จากมุมมอง ใช้ visibility ค่า hidden Element จะหายไปแต่ยังคงครอบครองพื้นที่ใน Layout ตัวอย่าง <html> <head></head> <body> <p>This paragraph should be visible.</p> <p style=visibility:hidden;> This paragraph should not be visi

  4. CSS height Property - กำหนดความสูง Box

    คุณสมบัติ height ใช้กำหนดความสูงของ Box รับค่าเป็นความยาว, เปอร์เซ็นต์, หรือ auto ตัวอย่าง <html> <head></head> <body> <p style=width:200px; height:50px; border:2px solid green; padding:15px; margin:20px;> This paragraph is 200pixels wide and 50 pixels high

  5. กำหนดความสูงสูงสุดของ Box ด้วย CSS max-height

    คุณสมบัติ max-height ใช้กำหนดความสูงสูงสุดที่ Box สามารถมีได้ ค่าเป็นตัวเลข, ความยาว, หรือเปอร์เซ็นต์ ตัวอย่าง <html> <head></head> <body> <p style=width:400px; max-height:10px; border:2px solid green; padding:10px; margin:15px;> This paragraph is 400px wide

  6. CSS width Property - กำหนดความกว้าง Box

    คุณสมบัติ width ใช้กำหนดความกว้างของ Box รับค่าเป็นความยาว, เปอร์เซ็นต์, หรือ auto ตัวอย่าง <html> <head></head> <body> <p style=width:200px; height:50px; border:2px solid green; padding:15px; margin:20px;> This paragraph is 200pixels wide and 50 pixels high

  7. การใช้งาน CSS visibility:hidden

    คุณสมบัติ visibility ค่า hidden ใช้ซ่อน Element แต่ยังคงครอบครองพื้นที่ใน Layout (ต่างจาก display: none ที่เอาพื้นที่ไปเลย) ตัวอย่าง <html> <head></head> <body> <p>This paragraph should be visible in normal way.</p> <p style=visibility:hidden;>

  8. CSS line-height Property - กำหนดความสูงบรรทัด

    คุณสมบัติ line-height ใช้กำหนดความสูงของบรรทัดข้อความ ค่าเป็นตัวเลข, ความยาว, หรือเปอร์เซ็นต์ ตัวอย่าง <html> <head></head> <body> <p style=width:300px; height:100px; border:2px solid green; padding:5px; margin:10px; line-height:30px;> This paragraph is 300

  9. CSS max-height Property - กำหนดความสูงสูงสุด

    คุณสมบัติ max-height ใช้กำหนดความสูงสูงสุดที่ Box สามารถมีได้ ค่าเป็นตัวเลข, ความยาว, หรือเปอร์เซ็นต์ ตัวอย่าง <html> <head></head> <body> <p style=width:400px; max-height:10px; border:2px solid green; padding:10px; margin:15px;> This paragraph is 400px wide

  10. CSS min-width Property - กำหนดความกว้างต่ำสุด

    คุณสมบัติ min-width ใช้กำหนดความกว้างต่ำสุดที่ Box สามารถมีได้ ค่าเป็นตัวเลข, ความยาว, หรือเปอร์เซ็นต์ ตัวอย่าง <html> <head></head> <body> <p style=min-width:400px; height:100px; border:1px solid red; padding:5px; margin:10px;> This paragraph is 100px high

  11. กำหนดความสูงของ Box ด้วย CSS

    คุณสมบัติ height ใช้กำหนดความสูงของ Box รับค่าเป็นความยาว, เปอร์เซ็นต์, หรือ auto ตัวอย่าง <html> <head></head> <body> <p style=width:200px; height:50px; border:2px solid green; padding:15px; margin:20px;> This paragraph is 200pixels wide and 50 pixels high

  12. กำหนดความกว้างของ Box ด้วย CSS

    คุณสมบัติ width ใช้กำหนดความกว้างของ Box รับค่าเป็นความยาว, เปอร์เซ็นต์, หรือคีย์เวิร์ด auto ตัวอย่าง <html> <head></head> <body> <p style=width:200px; height:50px; border:2px solid green; padding:15px; margin:20px;> This paragraph is 200pixels wide and 50 p

  13. ตัวอย่าง CSS Cursor Property - ครบทุกค่า

    ด้วย CSS cursor property สามารถแสดงเคอร์เซอร์แบบต่างๆ เช่น crosshair, pointer, move เป็นต้น ตัวอย่าง <html> <head></head> <body> <div style=cursor:auto>Auto</div> <div style=cursor:crosshair>Crosshair</div> <div style=cursor:default>D

  14. กำหนดความหนาของ Outline ด้วย CSS

    คุณสมบัติ outline-width ใช้กำหนดความหนาของ Outline รับค่าเป็นความยาว (px, em) หรือคีย์เวิร์ด thin, medium, thick ตัวอย่าง <html> <head></head> <body> <p style=outline-width:thin; outline-style:solid;> This text is having thin outline. </p> <

  15. CSS Outline Property - Shorthand สำหรับ Outline

    คุณสมบัติ outline เป็น Shorthand Property รวม outline-color, outline-style, outline-width ในการประกาศเดียว ตัวอย่าง <html> <head></head> <body> <p style=outline: thin solid green;> This text is having thin solid green outline. </p> <br />

  16. กำหนดรูปแบบเส้น Outline ด้วย CSS

    คุณสมบัติ outline-style ใช้ระบุรูปแบบเส้นที่ล้อมรอบ Element ตัวอย่าง <html> <head></head> <body> <p style=outline-width:thin; outline-style:solid;> This text is having thin solid outline. </p> <br /> <p style=outline-width:thick; o

  17. กำหนดสีของ Outline ด้วย CSS

    คุณสมบัติ outline-color ใช้กำหนดสีของ Outline รับค่าเป็นชื่อสี, รหัส Hex, หรือค่า RGB ตัวอย่าง <html> <head></head> <body> <p style=outline-width:thin; outline-style:solid; outline-color:blue> This text is having thin solid blue outline. </p> </

Total 1584 -คอมพิวเตอร์  FirstPage PreviousPage NextPage LastPage CurrentPage:72/80  20-คอมพิวเตอร์/Page Goto:1 66 67 68 69 70 71 72 73 74 75 76 77 78