Skip to content

How can I adjust the height automatically based on the device's width? #303

Answered by ArnabXD
Shubhankar-1 asked this question in Q&A
Discussion options

You must be logged in to vote

I use this to have a 16:9 aspect ratio

height={(9 / 16) * width}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Shubhankar-1
Comment options

Comment options

You must be logged in to vote
1 reply
@Shubhankar-1
Comment options

Answer selected by Shubhankar-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants