November 3, 2020 03:27 pm GMT
Original Link: https://css-tricks.com/gifs-and-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" type="image/webp"<img src="img/waterfall.jpg" alt="A bottom-up shot of a huge waterfall in Iceland with green moss on either side."</picture
But notice those <source>
elements there… they can take a media
attribute as well! In other words, they can be used … Read article “GIFS and prefers-reduced-motion”
The post GIFS and prefers-reduced-motion appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
Original Link: https://css-tricks.com/gifs-and-prefers-reduced-motion/
Share this article:
Tweet
View Full Article