10 CSS animation tips and tricks

Kevin Powell β€’ April 6, 2023
Video Thumbnail

About

No channel description available.

Video Description

CSS transitions and animations can be a lot of fun, and there are so many neat tips and tricks you can do with them! πŸ”— Links βœ… The CSS challenge video: https://youtu.be/gE5PnHcv3RI βœ… More on prefers-reduced-motion: https://youtu.be/zT9Ftmw0-uc βœ… More information on @property on the MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/@property ⌚ Timestamps 00:00 - Introduction 00:43 - Different timing functions for different states 02:23 - The order of keyframe animations doesn’t matter 04:00 - Declaring multiple keyframes with one declaration 05:05 - Omiting 0% and 100% 06:10 - Animating transform and the individual transform properties 07:52 - Using negative animation delays 10:08 - prefers-reduced-motion 12:44 - Using the same animation multiple times within one declaration 15:05 - Using @property to animate custom properties #css -- Come hang out with other dev's in my Discord Community πŸ’¬ https://discord.gg/nTYCvrK Keep up to date with everything I'm up to βœ‰ https://www.kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! πŸ“Ί https://www.twitch.tv/kevinpowellcss --- Help support my channel πŸ‘¨β€πŸŽ“ Get a course: https://www.kevinpowell.co/courses πŸ‘• Buy a shirt: https://teespring.com/stores/making-the-internet-awesome πŸ’– Support me on Patreon: https://www.patreon.com/kevinpowell --- My editor: VS Code - https://code.visualstudio.com/ --- I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Twitter: https://twitter.com/KevinJPowell Codepen: https://codepen.io/kevinpowell/ Github: https://github.com/kevin-powell --- And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Upgrade Your Home Now

AI-recommended products based on this video

Loading...
(2 Pack) Outlet Wall Mount Holder for Google Home Mini and Google Nest Mini, A Space-Saving Accessories with Cord Management for Google Mini Smart Speaker, No Messy Wires or Screws

(2 Pack) Outlet Wall Mount Holder for Google Home Mini and Google Nest Mini, A Space-Saving Accessories with Cord Management for Google Mini Smart Speaker, No Messy Wires or Screws

(3,057)
$15.99
Prime
200+ bought in past month
Loading...
Philips Hue Bridge - Unlock the Full Potential of Hue - Multi-Room and Out-of-Home Control - Create Automations and Zones - Secure, Stable Connection Won't Strain Your Wi-Fi - Works with Voice, Matter
Best Seller

Philips Hue Bridge - Unlock the Full Potential of Hue - Multi-Room and Out-of-Home Control - Create Automations and Zones - Secure, Stable Connection Won't Strain Your Wi-Fi - Works with Voice, Matter

(10,705)
$57.60$51.14
FREE delivery Thu, Sep 4
400+ bought in past month
Loading...
Kasa Smart Outdoor Smart Plug by TP-Link (KP400) - Smart WiFi Outlet with 2 Sockets, IP64 Waterproof, Works with Alexa and Google Home, 2.4GHz WiFi Required, No Hub Required, Sunset & Sunrise Offset

Kasa Smart Outdoor Smart Plug by TP-Link (KP400) - Smart WiFi Outlet with 2 Sockets, IP64 Waterproof, Works with Alexa and Google Home, 2.4GHz WiFi Required, No Hub Required, Sunset & Sunrise Offset

(28,846)
$21.99$17.99
FREE delivery Wed, Aug 20 on your first order
1K+ bought in past month
Loading...
Philips Hue Bridge - Unlock the Full Potential of Hue - Multi-Room and Out-of-Home Control - Create Automations and Zones - Secure, Stable Connection Won't Strain Your Wi-Fi - Works with Voice, Matter
Best Seller

Philips Hue Bridge - Unlock the Full Potential of Hue - Multi-Room and Out-of-Home Control - Create Automations and Zones - Secure, Stable Connection Won't Strain Your Wi-Fi - Works with Voice, Matter

(10,705)
$57.60$51.14
FREE delivery Thu, Sep 4
400+ bought in past month
Loading...
[3+3 Pack] for Samsung Galaxy S26 Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S26 Tempered Glass Screen Protector 5G

[3+3 Pack] for Samsung Galaxy S26 Screen Protector, 9H Tempered Glass, Ultrasonic Fingerprint Compatible, HD Clear Case Friendly for Samsung S26 Tempered Glass Screen Protector 5G

(2,374)
$11.99
FREE delivery Mon, Mar 30 on your first order
1K+ bought in past month
Loading...
TOCOL for Samsung Galaxy S26 Ultra Screen Protector Military Grade Shatterproof HD Tempered Glass Easy Installation Case Friendly 2 Packs Global Recycled Standard

TOCOL for Samsung Galaxy S26 Ultra Screen Protector Military Grade Shatterproof HD Tempered Glass Easy Installation Case Friendly 2 Packs Global Recycled Standard

(10,380)
$12.97
FREE delivery Sun, Mar 22 on your first order
1K+ bought in past month
Loading...
LK 3 Pack for Top 9H+ Samsung Galaxy S26 Ultra Screen Protector, 12FT Military Grade Shatterproof Tempered Glass Screen Protector S26 Ultra with Easy Install Frame, 0 Bubble, Fingerprint Unlock

LK 3 Pack for Top 9H+ Samsung Galaxy S26 Ultra Screen Protector, 12FT Military Grade Shatterproof Tempered Glass Screen Protector S26 Ultra with Easy Install Frame, 0 Bubble, Fingerprint Unlock

(10,892)
$10.79
FREE delivery Tue, Mar 24 on your first order
1K+ bought in past month
Loading...
[3+3 Pack] Glass Screen Protector for Samsung Galaxy S25 FE 5G, 9H Tempered Glass, Ultrasonic Fingerprint Unlock, HD Clear Case Friendly for Samsung Galaxy S25 FE Screen Protector

[3+3 Pack] Glass Screen Protector for Samsung Galaxy S25 FE 5G, 9H Tempered Glass, Ultrasonic Fingerprint Unlock, HD Clear Case Friendly for Samsung Galaxy S25 FE Screen Protector

(28)
$10.79
FREE delivery Sun, Sep 28 on your first order
Loading...
eufy Security Indoor Cam E220, 2K, Pan & Tilt, Indoor Security Camera, Wi-Fi Plug-in Camera, Human & Pet AI, Voice Assistant Compatibility, Night Vision, Motion Tracking, HomeBase not Compatible

eufy Security Indoor Cam E220, 2K, Pan & Tilt, Indoor Security Camera, Wi-Fi Plug-in Camera, Human & Pet AI, Voice Assistant Compatibility, Night Vision, Motion Tracking, HomeBase not Compatible

(21,703)
$45.99
FREE delivery Thu, Sep 4
500+ bought in past month
Loading...
eufy Security Solo Indoor Cam C120, 2K Security Indoor Camera, Plug-in Camera with Wi-Fi, IP Camera, Human & Pet AI, Voice Assistant Compatibility, Night Vision, Two-Way Audio, HomeBase not Compatible

eufy Security Solo Indoor Cam C120, 2K Security Indoor Camera, Plug-in Camera with Wi-Fi, IP Camera, Human & Pet AI, Voice Assistant Compatibility, Night Vision, Two-Way Audio, HomeBase not Compatible

(9,150)
$44.99
FREE delivery Thu, Sep 4
100+ bought in past month
Loading...
eufy Security, eufyCam 2C Pro Wireless Home Security Add-on Camera, 2K Resolution, 180-Day Battery Life, HomeKit Compatibility, IP67 Weatherproof, Night Vision, and No Monthly Fee.

eufy Security, eufyCam 2C Pro Wireless Home Security Add-on Camera, 2K Resolution, 180-Day Battery Life, HomeKit Compatibility, IP67 Weatherproof, Night Vision, and No Monthly Fee.

(774)
$109.99
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
eufy Security, eufyCam S220 (eufyCam 2C Pro) 2-Cam Kit, Wireless Home Security Camera, 2K Resolution, 180-Day Battery Life, HomeKit Compatibility, IP67, Night Vision, Motion Only Alert, No Monthly Fee

eufy Security, eufyCam S220 (eufyCam 2C Pro) 2-Cam Kit, Wireless Home Security Camera, 2K Resolution, 180-Day Battery Life, HomeKit Compatibility, IP67, Night Vision, Motion Only Alert, No Monthly Fee

(2,743)
$219.99
FREE delivery Thu, Sep 4
100+ bought in past month
Loading...
Sony WH-CH720N Noise Cancelling Wireless Headphones Bluetooth Over The Ear Headset with Microphone and Alexa Voice Control, Black
Best Seller

Sony WH-CH720N Noise Cancelling Wireless Headphones Bluetooth Over The Ear Headset with Microphone and Alexa Voice Control, Black

(10,648)
$148.00$118.10
PrimeFREE delivery Sat, Jun 14
500+ bought in past month
Loading...
(2 Pack) Outlet Wall Mount Holder for Google Home Mini and Google Nest Mini, A Space-Saving Accessories with Cord Management for Google Mini Smart Speaker, No Messy Wires or Screws

(2 Pack) Outlet Wall Mount Holder for Google Home Mini and Google Nest Mini, A Space-Saving Accessories with Cord Management for Google Mini Smart Speaker, No Messy Wires or Screws

(3,057)
$15.99
Prime
200+ bought in past month