aspect-ratio property in CSS #css #webdesign#shorts

preview_player
Показать описание
The aspect-ratio property was a recent addition to the CSS language. This solved an age old problem - making elements have a solid aspect ratio (mostly to create square elements)

In this example we can see that when we have set an aspect ratio and when we change the width of the element, the height automatically changes to match the aspect ratio

Have you used this property before? What use case would you use this for?

#css #html #javascript #webdevelopment #frontend #fullstack
Рекомендации по теме
visit shbcf.ru