Responsive Media Aspect-Ratio CSS

Turn source dimensions into a reduced aspect ratio and copy CSS for a consistent image or video frame.

How do cover and contain differ?

Cover fills the frame and may crop. Contain shows the complete media and may leave unused space.

Turn on JavaScript to use the interactive tools.