0

I am trying to develop a vertical flexbox meant to be shown on mobile phones. The flexbox will have width spanning the entire width of the phone screen so I'll have it set with width: 100%. I want one of the elements to be a square in dimensions meaning it will have the width of the flexbox which in this case will end up being the width of the phone screen and the height should be equal to that. The other elements in the flexbox will be normal without constraints. How can I accomplish this?

user782220
  • 10,677
  • 21
  • 72
  • 135

1 Answers1

0

there is a property named 'aspectRatio' , try this 'aspectRatio: 1' i.e style = "width 100%; aspectRatio : 1;"

DNA.h
  • 823
  • 8
  • 17