ตัวอย่างการสร้างแอนิเมชันเปลี่ยน padding ล่าง (padding-bottom) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 350px; height: 150px; outline: 3px solid blue; animation: myanim 3s infinite; } @keyframes myanim
ตัวอย่างการสร้างแอนิเมชันเปลี่ยน padding ล่าง (padding-bottom) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 350px; height: 150px; outline: 3px solid blue; animation: myanim 3s infinite; } @keyframes myanim
คุณสมบัติ voice-rate ใน CSS Speech Module ใช้กำหนดอัตราการพูด (speaking rate) ในหน่วยคำต่อนาที (words per minute) รูปแบบไวยากรณ์ voice-rate: [normal | x-slow | slow | medium | fast | x-fast] | <percentage> ตัวอย่าง /* ใช้ keyword */ p { voice-rate: x-fast; } /* พูดเร็วมาก */ /* ใช้เปอร์เซ็
ตัวอย่างการสร้างแอนิเมชันเปลี่ยนค่า max-height (ความสูงสูงสุด) ของ element พร้อม overflow auto ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 350px; background-color: orange; overflow: auto; border: 1px solid black; animat
ตัวอย่างการสร้างแอนิเมชันเปลี่ยน padding ซ้าย (padding-left) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 350px; height: 150px; outline: 3px solid orange; animation: myanim 3s infinite; } @keyframes myanim
ตัวอย่างการสร้างแอนิเมชันเปลี่ยน padding ขวา (padding-right) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 350px; height: 150px; outline: 3px solid orange; animation: myanim 3s infinite; } @keyframes myanim
คุณสมบัติ speak-as ใน CSS Speech Module ใช้กำหนดว่าข้อความควรอ่านออกเสียงแบบไหน: อ่านปกติ, สะกดตัวอักษร, อ่านตัวเลข, เป็นต้น ค่าที่ใช้ได้ normal: อ่านตามปกติ (default) spell-out: สะกดตัวอักษรทีละตัว (เช่น CSS → C-S-S) digits: อ่านตัวเลขทีละหลัก (เช่น 123 → หนึ่ง สอง สาม) literal-punctuatio
ตัวอย่างการสร้างแอนิเมชันเลื่อน element แนวนอนด้วยคุณสมบัติ right (ต้องใช้ร่วมกับ position: absolute/relative/fixed) ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> #demo { position: absolute; right: 0; width: 300px; height: 200px; back
ตัวอย่างการสร้างแอนิเมชันเปลี่ยนค่า max-width (ความกว้างสูงสุด) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { overflow: auto; background-color: blue; color: white; border: 1px solid black; animation: myanim 3s; }
คุณสมบัติ voice-balance ใน CSS Speech Module ใช้กำหนดตำแหน่งเสียง (spatial audio) ว่าเสียงพูดควรมาจากด้านซ้าย กลาง หรือขวา รูปแบบไวยากรณ์ voice-balance: left | center | right | <number> (-100 ถึง 100) ตัวอย่าง p { voice-balance: right; } คำอธิบายค่า: left / -100: เสียงมาจากซ้ายเต็มที
คุณสมบัติ voice-duration ใน CSS Speech Module ใช้กำหนดระยะเวลาที่ควรใช้ในการอ่าน element ใช้เมื่อต้องการซิงโครไนซ์เสียงพูดกับสื่ออื่น (เช่น แอนิเมชันวิดีโอ) ตัวอย่าง p { voice-duration: 5s; } ค่าที่ใช้ได้: เวลา: 5s, 500ms เป็นต้น auto (default): คำนวณอัตโนมัติจาก voice-rate และความยาวข้อค
ตัวอย่างการสร้างแอนิเมชันเปลี่ยนค่า min-height (ความสูงขั้นต่ำ) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { overflow: auto; width: 350px; background-color: blue; color: white; border: 1px solid black; animati
คุณสมบัติ rest-before ใน CSS Speech Module ใช้กำหนดระยะหยุดพัก (pause) ก่อน element เมื่ออ่านออกเสียง ตัวอย่าง h1 { rest-before: 15ms; } ค่าที่ใช้ได้: เวลา: 15ms, 200ms, 1s เป็นต้น Strength keywords: none, x-weak, weak, medium, strong, x-strong คำอธิบาย: ตัวอย่างตั้งค่าให้หยุดพัก 15 มิล
คุณสมบัติ transform-origin กำหนดจุดกำเนิด (pivot point) สำหรับการ transform (rotate, scale, skew) การ animate คุณสมบัตินี้จะทำให้การหมุน/ขยายมีจุดศูนย์กลางเปลี่ยนไปเรื่อยๆ ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> #demo1 { position: relative; heigh
ตัวอย่างการสร้างแอนิเมชันเปลี่ยนค่า min-width (ความกว้างขั้นต่ำ) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { overflow: auto; width: 50%; background-color: blue; color: white; border: 1px solid black; animatio
ตัวอย่างการสร้างแอนิเมชันเปลี่ยนระยะห่างบน (margin-top) ของ element ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { background-color: orange; animation: myanim 4s infinite; color: white; } @keyframes myanim { 30% { margi
คุณสมบัติ order ใน Flexbox/Grid กำหนดลำดับการแสดงผลของ items สามารถนำไปใช้ในแอนิเมชันได้ แต่จะมีการ กระโดด (discrete jump) ไม่ใช่การเคลื่อนไหวแบบต่อเนื่อง เพราะ order เป็นค่า integer ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> #demo1 { width: 600px;
ตัวอย่างการสร้างแอนิเมชันกับคุณสมบัติ margin แบบ shorthand (ทั้ง 4 ด้านพร้อมกัน) ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> p { animation: mymove 3s infinite; margin: 20px; } @keyframes mymove { 70% { margin: 60px; }
ตัวอย่างการสร้างแอนิเมชันเปลี่ยนความสูงบรรทัด (line-height) ของพารากราฟ ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> p { animation: mymove 3s infinite; line-height: 20px; } @keyframes mymove { 70% { line-height: 50px; }
คุณสมบัติ align-content: space-between ใช้กระจาย flex lines (หลายแถว) ให้มีระยะห่างเท่ากันระหว่างบรรทัด โดยบรรทัดแรกชิดจุดเริ่มต้น cross axis และบรรทัดสุดท้ายชิดจุดสิ้นสุด ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> .mycontainer { display: flex; heig
คุณสมบัติ border-top-right-radius ใช้กำหนดรัศมีของมุมขวาบน (top-right corner) ของ element แยกต่างหากจากมุมอื่นๆ ตัวอย่างโค้ด <html> <head> <style> #rcorner { border-radius: 25px; /* มุมทั้ง 4 ด้าน 25px */ border-top-right-radius: 45px; /* มุมขวาบน 45px