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

    หากต้องการจัดตำแหน่ง tooltip ให้ถูกต้อง ให้ใช้คุณสมบัติ right, left, top และ bottom ตัวอย่าง: Tooltip ด้านขวา <!DOCTYPE html> <html>    <style>       .mytooltip .mytext {          visibility: hidden;         &nb

  2. สร้าง Tooltip ด้านขวาด้วย CSS

    หากต้องการสร้าง tooltip ด้านขวา ให้ใช้คุณสมบัติ left ใน CSS ตัวอย่าง <!DOCTYPE html> <html>    <style>       .mytooltip .mytext {          visibility: hidden;          width: 140px;       &nb

  3. การใช้งาน CSS transition-timing-function property

    คุณสมบัติ transition-timing-function ใช้กำหนดโค้งความเร็วของ transition effect ค่าที่ตั้งได้ ได้แก่ ease, ease-in, ease-out, linear เป็นต้น ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          div {    

  4. เลือกทุก <p> วางทันทีหลัง <div> ด้วย CSS

    ใช้เซเล็กเตอร์ element+element เพื่อเลือกองค์ประกอบที่วางทันทีหลังองค์ประกอบแรกที่ระบุ ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          div + p {             color: white;  

  5. เลือกองค์ประกอบที่ค่าแอตทริบิวต์ขึ้นต้นด้วยค่าที่ระบุด้วย CSS

    หากต้องการเลือกองค์ประกอบที่ค่าแอตทริบิวต์ขึ้นต้นด้วยค่าที่กำหนด ให้ใช้เซเล็กเตอร์ [attribute^=value] ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          [alt^=Tutor] {             b

  6. กำหนดระยะเวลา Animation หนึ่งรอบด้วย CSS animation-duration

    ใช้คุณสมบัติ animation-duration เพื่อกำหนดว่าแอนิเมชันควรใช้เวลานานเท่าไรในการทำหนึ่งรอบ (cycle) ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: relative; background: red; animation-name: myan

  7. เลือกอิลิเมนต์ทั้งหมดด้วย CSS Universal Selector

    เพื่อเลือกอิลิเมนต์ทั้งหมดในหน้าเว็บ ให้ใช้ Universal Selector * ใน CSS ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อเลือกทุกอิลิเมนต์: <!DOCTYPE html> <html> <head> <style> * { color: blue; background-color: orange; } </style> </head> <body>

  8. กำหนดให้ Animation ทำงานหรือหยุดชั่วคราวด้วย CSS

    ใช้คุณสมบัติ animation-play-state เพื่อกำหนดว่าแอนิเมชันกำลังทำงานหรือหยุดชั่วคราว ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อตั้งค่าแอนิเมชันให้หยุด (pause): <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: relative; b

  9. คุณสมบัติ CSS animation-name

    ใช้คุณสมบัติ animation-name เพื่อกำหนดชื่อของ @keyframes animation ที่จะใช้ ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อทดสอบ animation-name property: <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; background-color: yellow; anim

  10. คุณสมบัติ CSS animation-play-state

    ใช้คุณสมบัติ animation-play-state เพื่อกำหนดว่าแอนิเมชันกำลังทำงานหรือหยุดชั่วคราว (paused) ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อทดสอบ animation-play-state property: <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: rela

  11. เลือกอิลิเมนต์ที่ alt มีคำว่า Tutorials ด้วย CSS

    ใช้ Selector [attribute~=value] เพื่อเลือกอิลิเมนต์ที่ค่าแอตทริบิวต์มีคำที่ระบุอยู่ (คั่นด้วย space) ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อทดสอบ [attribute~=value] selector โดยค้นหาคำว่า Tutorials: <!DOCTYPE html> <html> <head> <style> [alt~=Tutorials] { border: 5px

  12. คุณสมบัติ CSS animation-timing-function

    ลองรันโค้ดด้านล่างเพื่อทดสอบ animation-timing-function property: ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: relative; background-color: yellow; animation-name: myanim; animation-dur

Total 1584 -คอมพิวเตอร์  FirstPage PreviousPage NextPage LastPage CurrentPage:47/80  20-คอมพิวเตอร์/Page Goto:1 41 42 43 44 45 46 47 48 49 50 51 52 53