หากต้องการจัดตำแหน่ง tooltip ให้ถูกต้อง ให้ใช้คุณสมบัติ right, left, top และ bottom ตัวอย่าง: Tooltip ด้านขวา <!DOCTYPE html> <html> <style> .mytooltip .mytext { visibility: hidden; &nb
หากต้องการจัดตำแหน่ง tooltip ให้ถูกต้อง ให้ใช้คุณสมบัติ right, left, top และ bottom ตัวอย่าง: Tooltip ด้านขวา <!DOCTYPE html> <html> <style> .mytooltip .mytext { visibility: hidden; &nb
หากต้องการสร้าง tooltip ด้านขวา ให้ใช้คุณสมบัติ left ใน CSS ตัวอย่าง <!DOCTYPE html> <html> <style> .mytooltip .mytext { visibility: hidden; width: 140px; &nb
หากต้องการเลือกองค์ประกอบ ให้ใช้ element selector ตัวอย่าง <!DOCTYPE html> <html> <head> <style> p { color: blue; backgroun
คุณสมบัติ transition-timing-function ใช้กำหนดโค้งความเร็วของ transition effect ค่าที่ตั้งได้ ได้แก่ ease, ease-in, ease-out, linear เป็นต้น ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div {
ใช้คุณสมบัติ transition-timing-function เพื่อกำหนดโค้งความเร็วของ transition effect ค่าที่ใช้ได้ ได้แก่ ease, ease-in, ease-out, linear เป็นต้น ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { &nb
ใช้คุณสมบัติ transition-delay เพื่อหน่วงเวลาเอฟเฟกต์ transition ใน CSS ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { width: 150px;
ใช้คุณสมบัติ animation-timing-function พร้อมค่า linear เพื่อสร้างแอนิเมชันที่เคลื่อนที่ด้วยความเร็วคงที่ตลอด ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { wid
ใช้คุณสมบัติ animation-timing-function พร้อมค่า ease-in เพื่อสร้างแอนิเมชันที่เริ่มช้าลง ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { width: 150px; &n
ใช้เซเล็กเตอร์ element > element เพื่อเลือกองค์ประกอบที่มี parent element เป็นองค์ประกอบที่ระบุ ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div > p { color:
ใช้เซเล็กเตอร์ element+element เพื่อเลือกองค์ประกอบที่วางทันทีหลังองค์ประกอบแรกที่ระบุ ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div + p { color: white;
ใช้คุณสมบัติ animation-timing-function พร้อมค่า ease-out เพื่อสร้างแอนิเมชันที่จบช้าลง ตัวอย่าง <!DOCTYPE html> <html> <head> <style> div { width: 150px; &nbs
หากต้องการเลือกองค์ประกอบทั้งหมดที่มี id=tutorials ให้ใช้เซเล็กเตอร์ #id ใน CSS ตัวอย่าง <!DOCTYPE html> <html> <head> <style> #tutorials { border: 3px solid red; &n
หากต้องการเลือกองค์ประกอบที่ค่าแอตทริบิวต์ขึ้นต้นด้วยค่าที่กำหนด ให้ใช้เซเล็กเตอร์ [attribute^=value] ตัวอย่าง <!DOCTYPE html> <html> <head> <style> [alt^=Tutor] { b
ใช้คุณสมบัติ animation-duration เพื่อกำหนดว่าแอนิเมชันควรใช้เวลานานเท่าไรในการทำหนึ่งรอบ (cycle) ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: relative; background: red; animation-name: myan
เพื่อเลือกอิลิเมนต์ทั้งหมดในหน้าเว็บ ให้ใช้ Universal Selector * ใน CSS ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อเลือกทุกอิลิเมนต์: <!DOCTYPE html> <html> <head> <style> * { color: blue; background-color: orange; } </style> </head> <body>
ใช้คุณสมบัติ animation-play-state เพื่อกำหนดว่าแอนิเมชันกำลังทำงานหรือหยุดชั่วคราว ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อตั้งค่าแอนิเมชันให้หยุด (pause): <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: relative; b
ใช้คุณสมบัติ animation-name เพื่อกำหนดชื่อของ @keyframes animation ที่จะใช้ ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อทดสอบ animation-name property: <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; background-color: yellow; anim
ใช้คุณสมบัติ animation-play-state เพื่อกำหนดว่าแอนิเมชันกำลังทำงานหรือหยุดชั่วคราว (paused) ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อทดสอบ animation-play-state property: <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: rela
ใช้ Selector [attribute~=value] เพื่อเลือกอิลิเมนต์ที่ค่าแอตทริบิวต์มีคำที่ระบุอยู่ (คั่นด้วย space) ตัวอย่างโค้ด ลองรันโค้ดด้านล่างเพื่อทดสอบ [attribute~=value] selector โดยค้นหาคำว่า Tutorials: <!DOCTYPE html> <html> <head> <style> [alt~=Tutorials] { border: 5px
ลองรันโค้ดด้านล่างเพื่อทดสอบ animation-timing-function property: ตัวอย่างโค้ด <!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: relative; background-color: yellow; animation-name: myanim; animation-dur