Aspect ratio CSS for responsive videos
Years and years we have used padding hack for responsive videos and iframes. But now we can use aspect-ratio property. The aspect-ratio property allows you to set the aspect ratio of an element directly. Here’s an example code to set an aspect ratio of 16:9 for an iframe using the aspect-ratio property: In the above …