Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
gif

9 Articles
{
,

}
Direct link to the article GIFs Without the .gif: The Most Performant Image and Video Options Right Now
avif gif image-set picture video webp

GIFs Without the .gif: The Most Performant Image and Video Options Right Now

So you want an auto-playing looping video without sound? In popular vernacular this is the very meaning of the word GIF. The word has stuck around but the image format itself is ancient and obsolete. Twitter, for example, has …

Ollie Williams on Sep 28, 2022
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" 
…
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 …

Chris Coyier 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 …

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 …

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 …

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, …

Chris Coyier on Feb 21, 2020
Direct link to the article Optimizing GIFs for the Web
gif performance video

Optimizing GIFs for the Web

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

…
Robin Rendle on Feb 18, 2017
Direct link to the article New `video` Policies for iOS
gif video

New `video` Policies for iOS

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: …

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
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top