เครื่องมือสร้างเส้นโค้งการเร่งความเร็ว Cubic Bezier
สร้างเส้นโค้งการเร่งความเร็ว cubic-bezier สำหรับ CSS รวมค่าที่ตั้งไว้ล่วงหน้าแบบมาตรฐาน
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
วิธีใช้เครื่องมือนี้
- 1
Click a preset (ease, ease-in, ease-out, or ease-in-out) to load its four control values, or skip this to start from the default ease curve.
- 2
Drag the a, b, c, and d sliders to adjust the two control points; each ranges from -1 to 2 in steps of 0.05 and the current value shows above the slider.
- 3
Read the generated transition-timing-function: cubic-bezier(a, b, c, d); line in the output box.
- 4
Copy that declaration by hand and drop it into your CSS transition or animation rule.
เครื่องมือสร้างเส้นโค้ง Cubic Bezier คืออะไร?
แอนิเมชัน CSS ใช้ฟังก์ชันการเร่งความเร็ว (easing) เพื่อควบคุมว่าค่าต่างๆ เปลี่ยนแปลงไปตามเวลาอย่างไร พารามิเตอร์ทั้งสี่ของ cubic-bezier กำหนดเส้นโค้งจาก (0,0) ถึง (1,1) ยิ่งเส้นโค้งชันมากเท่าใด แอนิเมชันในบริเวณนั้นก็ยิ่งเร็วมากขึ้นเท่านั้น ค่าที่ตั้งไว้ล่วงหน้าแบบทั่วไปครอบคลุมความต้องการส่วนใหญ่ ส่วนเส้นโค้งแบบกำหนดเองช่วยสร้างการเคลื่อนไหวที่มีเอกลักษณ์
กรณีการใช้งานทั่วไป
Tuning a button hover or focus transition so it feels snappy on entry and gentle on exit instead of using the generic default ease.
Designing a card or modal that overshoots slightly on open by pushing the d (P2 y) value above 1 for a subtle bounce.
Matching a brand motion spec where designers handed you specific cubic-bezier control points to reproduce in CSS.
Replacing a linear or default easing on a loading spinner or progress bar with a custom acceleration profile.
Quickly grabbing the canonical values behind ease-in-out without memorizing 0.42, 0, 0.58, 1.
Prototyping menu slide-in and drawer animations by comparing how ease-in versus ease-out change the perceived weight of the motion.
คำถามที่พบบ่อย
ความแตกต่างระหว่าง ease และ ease-in คืออะไร?▼
ฉันควรใช้เส้นโค้งแบบกำหนดเองเมื่อใด?▼
เครื่องมือที่เกี่ยวข้อง
เครื่องมือแปลงสี (HEX/RGB/HSL)
แปลงสีระหว่างรูปแบบ HEX, RGB และ HSL เลือกสีด้วยภาพหรือป้อนค่าด้วยตนเอง
เครื่องมือสร้าง Box Shadow CSS
สร้างค่า box-shadow ใน CSS แบบมองเห็นภาพได้ ดูตัวอย่างแบบเรียลไทม์และคัดลอก CSS ที่สร้างขึ้น
เครื่องมือสร้างไล่ระดับสีของ CSS
สร้างไล่ระดับสีของ CSS แบบเส้นตรงและแบบรัศมี เลือกสีแบบเห็นภาพและคัดลอก CSS ที่สร้างขึ้น
เครื่องมือสร้างชุดสี
สร้างชุดสีที่กลมกลืนจากสีฐานใดก็ได้ รองรับโทนสีคู่ตรงข้าม สีข้างเคียง สามสีไตรแอด และสีโมโนโครม
เครื่องมือสร้าง Border Radius CSS
สร้างค่า border-radius ที่ซับซ้อนใน CSS แบบมองเห็นภาพได้ ควบคุมแต่ละมุมได้อย่างอิสระ
ตัวสร้าง CSS Clamp()
สร้างค่า CSS แบบลื่นไหลและตอบสนองด้วย clamp() ปรับขนาดอย่างนุ่มนวลระหว่างขนาดต่ำสุดและสูงสุดตลอดช่วงของ viewport