CSS3 Flexible Box Model and Fixed Compression Ratio

All the examples that I could find in a flexible box show that the material expands either horizontally or vertically. I could not understand how to expand flexibly while maintaining a fixed aspect ratio.

+6
source share
1 answer

I recently asked a similar question on the W3C Course Forum and received a detailed answer from one of the instructors, Phil Archer. He suggests using SVG to maintain aspect ratio when scaling, and also shows, for example, that it works well in web browsers, but not so well on mobile phones. See http://philarcher.org/diary/2012/scalablesquares for more details.

+1
source

Source: https://habr.com/ru/post/893122/


All Articles