Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 879 Bytes

README.md

File metadata and controls

17 lines (10 loc) · 879 Bytes

Responsive Aspect Ratio Cards

https://davidbullock.github.io/responsive-aspect-ratio-cards/

Simple cards with responsive, fixed aspect ratio images. Aspect ratio is set on image container. “Object-fit: cover“ is used with images of unknown dimensions, a basic CSS only fallback is used for IE9+.

There are a couple of useful aspect ratios in the list of variables, these essentially form a fraction for the image container.

Consider object-fit polyfil solutions for IE.

Preview Responsive Aspect Ratio Cards

Browser Support

IE9 IE10 IE11 Chrome Opera Firefox Safari Chrome (Android) Mobile Safari
B B B A A A A A A