Size Elements based on Aspect Ratio with HTML only!
Опубликовано: 15 Октябрь 2023 на канале: MK The Dev
73
like
In this tip, we'll demonstrate how to use the svg tag and its viewBox attribute to set the size of an HTML element based on a defined aspect ratio, all without the need for complex CSS calculations or any JavaScript framework.