# CSS animations

A CSS module for animating CSS property values over time using keyframes, with controls for duration, repetition, and behavior.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## React Labs: View Transitions, Activity, and more

DevFeed: [React Labs: View Transitions, Activity, and more](<https://devfeed.tech/articles/react-labs-view-transitions-activity-and-more-2986.md>)

Original publisher: [Read original article](<https://react.dev/blog/2025/04/23/react-labs-view-transitions-activity-and-more>)

Author: Ricky Hanlon

Published: 2025-04-23T00:00:00Z

Content type: article

Language: en

Sources: [React Blog](<https://devfeed.tech/sources/react-blog.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [view transitions](<https://devfeed.tech/topics/view-transitions.md>), [Development](<https://devfeed.tech/topics/development.md>), [ui](<https://devfeed.tech/topics/ui.md>), [CSS animations](<https://devfeed.tech/topics/css-animations.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [css-animations](<https://devfeed.tech/tags/css-animations.md>), [development](<https://devfeed.tech/tags/development.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [react](<https://devfeed.tech/tags/react.md>), [ui](<https://devfeed.tech/tags/ui.md>), [view-transitions](<https://devfeed.tech/tags/view-transitions.md>)

### AI overview

A React Labs article introduces experimental View Transitions and Activity features. It explains how React can declaratively animate UI transitions using browser View Transition APIs, CSS animations, and triggers such as navigation, state updates, and content switching.

### Source excerpt

In React Labs posts, we write about projects in active research and development. In this post, we're sharing two new experimental features that are ready to try today, and updates on other areas we're working on now.

## CSS-only glitch effect

DevFeed: [CSS-only glitch effect](<https://devfeed.tech/articles/css-only-glitch-effect-37255.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/css-image-glitch/>)

Author: Stanko

Published: 2025-04-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [CSS animations](<https://devfeed.tech/topics/css-animations.md>), [HTML](<https://devfeed.tech/topics/html.md>), [html elements](<https://devfeed.tech/topics/html-elements.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [animation](<https://devfeed.tech/tags/animation.md>), [css](<https://devfeed.tech/tags/css.md>), [css-animations](<https://devfeed.tech/tags/css-animations.md>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>)

### AI overview

This tutorial explains how to create an image glitch effect using only HTML and CSS. It describes representing an image as vertically shifted strips, varying strip heights, displacing the strips, altering colors, and using closely spaced CSS keyframes to create abrupt movement. JavaScript is used only to generate the HTML and CSS, not in the final effect.

### Source excerpt

Let me show you how I created a CSS-only image glitch effect. I was working on the robot poet and wanted my robotic bard to glitch - because it felt fitting given the quality of poetry it generates. Here's the final result: The effect involves quite a bit of HTML and CSS but no JavaScript. I did use JavaScript to generate the HTML and CSS, but it is not used in the final version. To be clear, there's nothing wrong with using JavaScript for this kind of thing. I just saw it as a fun challenge to make a pure CSS version. The idea # In the words of Daft Punk: Slice It Move It Hue-Rotate It We'll have to slice the image into strips and randomly displace them while altering colors at the same time. Slice it # I wanted to use a single image without having to slice it manually. To achieve that, we need to create a bunch of divs. Each div represents one strip and has the image set as a background, but the image is shifted vertically. When stacked on top of each other, the divs look the same as the original image. To make the glitch effect more believable, we'll use a random height for each strip. We could do this by hand, but that would be tedious, so let's use code: const getStripHTML = (top: number, stripHeight: number): string => { const duration = random(5, 10); const name = `glitch-${duration}`; return ` <div class="strip" style="height: ${stripHeight}px; background-position: 0 -${top}px;" />`; }; const getGlitchHTML = (height: number): string[] => { let i = 0; const html: string[] = []; while (1) { const stripHeight = random(1, 6); if (i + stripHeight < height) { const strip = getStripHTML(i, stripHeight); html.push(strip); } else { // Last strip const strip = getStripHTML(i, height - i); html.push(strip); break; } i = i + stripHeight; } return html; }; Show codeHide code This gives us a list of divs with the image inside. When we render them all, we get the original image in a bunch of HTML elements we can manipulate individually. Toggle gap Now that we have our stri

## Using CSS animations instead of JavaScript timers

DevFeed: [Using CSS animations instead of JavaScript timers](<https://devfeed.tech/articles/using-css-animations-instead-of-javascript-timers-37252.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/css-animations-instead-of-js-timers/>)

Author: Stanko

Published: 2023-08-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [CSS animations](<https://devfeed.tech/topics/css-animations.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [web animation](<https://devfeed.tech/topics/web-animation.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>)

Tags: [animations](<https://devfeed.tech/tags/animations.md>), [api](<https://devfeed.tech/tags/api.md>), [css](<https://devfeed.tech/tags/css.md>), [css-animations](<https://devfeed.tech/tags/css-animations.md>), [javascript](<https://devfeed.tech/tags/javascript.md>)

### AI overview

This tutorial explains how to build timers with CSS animations and class changes instead of JavaScript timer functions. It covers pausing, resuming, restarting, animation events, repeated timers, chaining timers, and using the approach for an autoplaying carousel. It also notes that precise progress tracking requires the Web Animations API.

### Source excerpt

What if I told you that we can make a timer without using setTimeout, setInterval or requestAnimationFrame? JavaScript is still necessary, but we can create the timer just by toggling some CSS classes. While I was working on an autoplay feature for a carousel, I thought to myself - CSS animations are kinda like timers. They have animationstart and animationend events and an ability to pause them. On top of that, we get the animation loop for free, which we would have to implement manually in JavaScript. Implementation # To make the timer, we'll need four CSS classesPlease note that we could create a minimal example with only two classes (.timer and .timer--running), but it is pretty limiting and therefore we are going to skip it.: .timer - initial styles .timer--running - starts the animation .timer--paused - pauses the animation (can only be used in combination with .timer--running) .timer--done - final state of the animation We'll start a timer by adding a .timer--running class. In the case that we are restarting it, we also need to remove the .timer--done class. // Start the timer $timer.classList.add('timer--running'); // $timer is a reference to the timer's DOM element $timer.classList.remove('timer--done'); To pause it we'll add .timer--paused class. Resume it by removing the class. // Toggle the pause class $timer.classList.toggle('timer--pause'); Once animationend event is triggered, we know the animation is done, so we need to add .timer--done and to remove .timer--running class. // Update classes so the timer can be restarted $timer.classList.add('timer--done'); $timer.classList.remove('timer--running'); When we put it all together, we get a minimal working example: Start / stop Code is also available on CodePen for you to play with. This timer works similarly to setTimeout, but it comes with it's own animation loop and an easy way to pause it. animationiteration # To get a behavior similar to setInterval we are going to switch to animationiteration instea

## CSS only sprite animations

DevFeed: [CSS only sprite animations](<https://devfeed.tech/articles/css-only-sprite-animations-37258.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/css-only-sprite-animations/>)

Author: Stanko

Published: 2019-07-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [CSS animations](<https://devfeed.tech/topics/css-animations.md>), [web animation](<https://devfeed.tech/topics/web-animation.md>), [Code](<https://devfeed.tech/topics/code.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [animations](<https://devfeed.tech/tags/animations.md>), [code](<https://devfeed.tech/tags/code.md>), [css](<https://devfeed.tech/tags/css.md>), [css-animations](<https://devfeed.tech/tags/css-animations.md>), [pixel](<https://devfeed.tech/tags/pixel.md>)

### AI overview

A tutorial on creating sprite and frame-by-frame animations using CSS only. It compares separately animated frames with a single parent animation using the steps() timing function, and demonstrates the technique with a retro text loader and pixel-art images.

### Source excerpt

I haven't published anything in a while, which is a shame because I have a couple of good things to write about. That said, today's post is going to be a short one. I wasn't sure if theme is interesting enough. But in the end I decided to write it anyway. And it will help me get back in the writing shape. While setting up a new project on Netlify, I was going through the logs and noticed they are using old schoolAs far as I know people started using it back in the 80s. text only loader. It is a very simple animation swapping between four text characters (--, \, |, /). Haven't even checked if they are using gif or not, but immediately tried recreating it using CSS only. The first version # The first thing I tried was to stack frames one of top of the other, and then animate every frame separately. Animation will make element visible only for the duration of one frame. Then using animation-delay we can adjust each frame. Code for four frames looked something like this: $frame-duration: 125ms; @keyframes frame-animation { 0%, 25% { opacity: 1; } // Make opacity transition from 1 to 0 as short as possible 25.01% { opacity: 0; } } // Add delay for each frame @for $i from 1 through 4 { .Animation-frame:nth-child(#{ $i }) { animation-delay: 250ms * ($i - 1); } } This worked well for our retro loader with four frames. Then I tried to animate images in the same way and again it worked fine. Applying common hacks to activate hardware acceleration didn't help, so I went back to the drawing board. Animation steps to the rescue # First order of business was to try to remove animations for individual frames, and use only one on the parent element. And to do it without JavaScript. Something like a slider, where slides are swapped without animation. Then it hit me! I remembered seeing that CSS animations can use steps. So I searched for it and found out the syntax: animation-timing-function: steps(4); What MDN says about steps: Displays an animation iteration along n stops along the

## A primer to vestibular disorders

DevFeed: [A primer to vestibular disorders](<https://devfeed.tech/articles/a-primer-to-vestibular-disorders-9419.md>)

Original publisher: [Read original article](<https://a11yproject.com/posts/understanding-vestibular-disorders/>)

Author: Dennis Gaebel

Published: 2013-05-05T00:00:00Z

Content type: article

Language: en

Sources: [The A11Y Project](<https://devfeed.tech/sources/the-a11y-project.md>)

Topics: [CSS animations](<https://devfeed.tech/topics/css-animations.md>), [web animation](<https://devfeed.tech/topics/web-animation.md>), [how to create smooth CSS transitions](<https://devfeed.tech/topics/how-to-create-smooth-css-transitions.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [animation](<https://devfeed.tech/tags/animation.md>), [browser](<https://devfeed.tech/tags/browser.md>), [css](<https://devfeed.tech/tags/css.md>), [css-animations](<https://devfeed.tech/tags/css-animations.md>), [web](<https://devfeed.tech/tags/web.md>), [web-animation](<https://devfeed.tech/tags/web-animation.md>)

### AI overview

This article introduces vestibular disorders, explaining how inner-ear dysfunction can affect balance, visual perception, concentration, and mobility. It then discusses how animations, parallax scrolling, sliders, videos, and rapid movement can worsen symptoms, and recommends accessible practices such as avoiding autoplay, indicating expected movement, providing controls to disable motion, and using the CSS prefers-reduced-motion media query.

### Source excerpt

Your Vestibular system is the sensory mechanism in the inner ear that detects movement of the head and helps to control balance. Imagine a world where your internal gyroscope is not working properly. Very similar to being intoxicated, things seem to move of their own accord, your feet never quite seem to be stable underneath you, and your senses are moving faster or slower than the rest of your body. Your personal steady-cam is broken. Whatever you look at tends to move regardless of if you are moving. Let's take that feeling and check out that great new website with animations and parallax scrolling. Does your stomach want to jump out of your throat? Well for many people it does. What is it? People with vestibular disorders have a problem with their inner ear. It affects their balance as well as their visual perception of their world around them. Sometimes the sensation lasts only a short while, but others can experience it for years. Walking can become a challenge and they may experience a constant risk of falling. Concentration can be diminished, leaving a person unfocused and consequently unproductive. It is often viewed as a "hidden" disability because it has no outward showing symptoms. Who is at risk? The cause may be from illness, injury, or a genetic condition, but anyone can suffer from a vestibular disorder. According to vestibular.org, a resource for people with vestibular disorders, as many as 35% of adults aged 40 years or older in the United States have experienced some form of vestibular dysfunction. What should you consider? Don't make animations, sliders, videos, or rapid movement start automatically. Give an indicator of what movement will happen on the site when someone takes action. Allow the option to turn off any animation and movement at any point in the process. Also, with the CSS prefers-reduced-motion media query you can write conditional CSS animations and transitions based on the user's preference exposed from the browser settings. For e