Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • DigitalOcean
  • DO Community
Search

Articles Tagged
gif

8 Articles
{
,

}
Direct link to the article GIFS and prefers-reduced-motion
gif picture prefers-reduced-motion

GIFS and prefers-reduced-motion

The <picture> element has a trick it can do where it shows different image formats in different situations. If all you are interested in is formats for the sake of performance, maybe you’d do:

<picture<source srcset="img/waterfall.avif" type="image/avif"<source srcset="img/waterfall.webp" 
…
Avatar of Chris Coyier
Chris Coyier on Nov 3, 2020
Direct link to the article Pausing a GIF with details/summary
details/summary gif

Pausing a GIF with details/summary

Steve Faulkner has a clever idea here. You can show an (animated) GIF and overlay a pause/play button on top of it — which is really a <details>/<summary> element. When toggled, a (non-animated) JPG inside covers the …

Avatar of Chris Coyier
Chris Coyier on Jul 22, 2020 (Updated on Jul 28, 2020)
Direct link to the article Masking GIFs with other GIFs
gif mask

Masking GIFs with other GIFs

The other day, Cassie Evans tweeted a really neat trick that I’ve never seen before: using SVG to mask one GIF on top of another. The effect is quite lovely, especially if you happen to grab a colorful GIF and …

Avatar of Robin Rendle
Robin Rendle on Dec 3, 2019
Direct link to the article Reduced Motion Picture Technique, Take Two
a11y animation gif picture web components

Reduced Motion Picture Technique, Take Two

Did you see that neat technique for using the <picture></picture> element with <source media=""/> to serve an animated image (or not) based on a prefers-reduced-motion media query?

After we shared that in our newsletter, we got an interesting …

Avatar of Chris Coyier
Chris Coyier on Jun 21, 2019
Direct link to the article Fallbacks for Videos-as-Images
gif responsive images safari video

Fallbacks for Videos-as-Images

Safari 11.1 shipped a strange-but-very-useful feature: the ability to use a video source in the <img /> tag. The idea is it does the same job as a GIF (silent, autoplaying, repeating), but with big performance gains. How big? “20x …

Avatar of Chris Coyier
Chris Coyier on Feb 7, 2018
Direct link to the article Full Page Background Video Styles
gif video

Full Page Background Video Styles

I bet you’ve seen it. A video background that takes up the entire browser window. There is text on top of it (hence, “background”), which is an interesting effect that you don’t see every day. The biggest reason you don’t, …

Avatar of Chris Coyier
Chris Coyier on May 28, 2017 (Updated on Feb 21, 2020)
gif performance video

Optimizing GIFs for the Web

Direct Link

Ire Aderinokun describes a frustrating problem that we’ve probably all noticed at one point or another:

Recently, I’ve found that some of my articles that are GIF-heavy tend to get incredibly slow. The reason for this is that each frame

…
Avatar of Robin Rendle
Shared by Robin Rendle on Feb 18, 2017
gif video

New `video` Policies for iOS

Direct Link

This is pretty big news: earlier today the WebKit team announced that iOS 10 will now support silent <video> elements with the autoplay attribute, which is a big deal for performance. Jer Noble describes the update in much more detail: …

Avatar of Robin Rendle
Shared by Robin Rendle on Jul 26, 2016

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • DigitalOcean
  • DigitalOcean Community
  • About DigitalOcean
  • Legal
  • Free Credit Offer
Minisites
  • The Power of Serverless
  • Upcoming Conferences
  • Coding Fonts
  • The Greatest CSS Tricks
Contact
  • Email
  • Guest Writing
Follow
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • iTunes
  • RSS
Back to Top