Search
CSS Olympic Rings
7.8.2024
It was a few years ago during the 2020 Olympics in Tokyo 2020 that I made a demo of animated 3D Olympic rings. I like it, it looks great, and I love the effect of the rings crossing each other.…
CSS Olympic Rings originally published on CSS-Tricks, which is part of the DigitalOcean family....
CSS Infinite Slider Flipping Through Polaroid Images
9.12.2022
In the last article, we made a pretty cool little slider (or “carousel” if that’s what you prefer) that rotates in a circular direction. This time we are going to make one that flips through a stack of Polaroid …
CSS Infinite Slider Flipping Through Polaroid Images originally...
CSS Infinite and Circular Rotating Image Slider
2.12.2022
Image sliders (also called carousels) are everywhere. There are a lot of CSS tricks to create the common slider where the images slide from left to right (or the opposite). It’s the same deal with the many JavaScript libraries out …
CSS Infinite and Circular Rotating Image Slider originally...
Hacking CSS Animation State and Playback Time
6.9.2022
CSS-only Wolfenstein is a little project that I made a few weeks ago. It was an experiment with CSS 3D transformations and animations.
Inspired by the FPS demo and another Wolfenstein CodePen, I decided to build my own version. …
Hacking CSS Animation State and Playback Time originally...
No Motion Isn’t Always prefers-reduced-motion
8.2.2022
There is a code snippet that I see all the time when the media query prefers-reduced-motion is talked about. Here it is:
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms...
How to Make a Pure CSS 3D Package Toggle
12.1.2022
You know how you can get cardboard boxes that come totally flat? You fold ‘em up and tape ‘em to make them into a useful box. Then when it’s time to recycle them, you cut them back apart to flatten …
How to Make a Pure CSS 3D Package Toggle originally published on CSS-Tricks. You should...
Diagonal Stripes Wipe Animation
30.11.2021
I was playing this game on Apple Arcade the other day called wurdweb. It’s a fun little game! Little touches like the little shape dudes that walk around the screen (but otherwise don’t do anything) give it a lot …
The post Diagonal Stripes Wipe Animation appeared first...
Recreating the Apple Music Hits Playlist Animation in CSS
29.11.2021
Apple Music has this “Spatial Audio” feature where the direction of the music in your headphones is based on the location of the device. It’s tough to explain just how neat it is. But that’s not what I’m here to …
The post Recreating the Apple Music Hits...
A Handy Little System for Animated Entrances in CSS
26.11.2021
I love little touches that make a website feel like more than just a static document. What if web content wouldn’t just “appear” when a page loaded, but instead popped, slid, faded, or spun into place? It might be a …
The post A Handy Little System for Animated Entrances in CSS appeared...
SVG Overlay and Infinite Menu Background Animation
2.11.2021
A little menu effect with an SVG overlay and an infinite background CSS animation.
The post SVG Overlay and Infinite Menu Background Animation appeared first on Codrops
SVG Overlay and Infinite Menu Background Animation
2.11.2021
A little menu effect with an SVG overlay and an infinite background CSS animation.
The post SVG Overlay and Infinite Menu Background Animation appeared first on Codrops
Of Course We Can Make a CSS-Only Clock That Tells the Current Time!
16.7.2021
Let’s build a fully functioning and settable “analog” clock with CSS custom properties and the calc() function. Then we’ll convert it into a “digital” clock as well. All this with no JavaScript!
Here’s a quick look at the clocks …
The post Of Course We Can Make a CSS-Only Clock That Tells...
Build Complex CSS Transitions using Custom Properties and cubic-bezier()
14.7.2021
I recently illustrated how we can achieve complex CSS animations using cubic-bezier() and how to do the same when it comes to CSS transitions. I was able to create complex hover effect without resorting to keyframes. In this article, I …
The post Build Complex CSS Transitions using Custom...
Advanced CSS Animation Using cubic-bezier()
13.5.2021
When dealing with complex CSS animations, there is a tendency to create expansive @keyframes with lots of declarations. There are a couple of tricks though that I want to talk about that might help make things easier, while staying in …
The post Advanced CSS Animation Using cubic-bezier()...
Image Fragmentation Effect With CSS Masks and Custom Properties
23.3.2021
Geoff shared this idea of a checkerboard where the tiles disappear one-by-one to reveal an image. In it, an element has a background image, then a CSS Grid layout holds the “tiles” that go from a filled background color to …
The post Image Fragmentation Effect With CSS Masks and Custom...
Exploring @property and its Animating Powers
4.3.2021
Uh, what’s @property? It’s a new CSS feature! It gives you superpowers. No joke, there is stuff that @property can do that unlocks things in CSS we’ve never been able to do before.
While everything about @property is exciting, …
The post Exploring @property and its Animating Powers appeared...
Animating a CSS Gradient Border
8.2.2021
This little trick for gradient borders is super useful:
.border-gradient {
border: 5px solid;
border-image-slice: 1;
border-image-source: linear-gradient(to left, #743ad5, #d53a9d);
}
Here’s some basic demos from our article on the subject. Sephanie Eckles was sharing around the idea...
Re-Creating the Porky Pig Animation from Looney Tunes in CSS
26.1.2021
You know, Porky Pig coming out of those red rings announcing the end of a Looney Tunes cartoon. We’ll get there, but first we need to cover some CSS concepts.
Everything in CSS is a box, or rectangle. Rectangles …
The post Re-Creating the Porky Pig Animation from Looney Tunes in CSS appeared...
Checkerboard Reveal
25.1.2021
Back when I was 10, I remember my cousin visiting our house. He was (and still is) a cool kid, the kind who’d bring his own self-programmed chess game on a floppy disk. And his version of chess was …
The post Checkerboard Reveal appeared first on CSS-Tricks.
You can support CSS-Tricks...
AnimXYZ
18.1.2021
There are quite a few CSS animation libraries. They tend to be a pile of class names that you can apply as needed like “bounce” or “slide-right” and it’ll… do those things. They tend to be pretty opinionated with …
The post AnimXYZ appeared first...