-2
I have an image that I would like its width to be 100% the width of the screen and the height to be the same size as with (that is to say 100% the width of the screen), someone could help me with this?
code of my image:
export const Photo profile = Styled. Imagemargin-top: 26px; width: 100%; height: ?;
;
Use:
width: 100%; height: 100%; top: 0; left: 0; right: 0; bottom: 0;
thus, it will take proportion of the screen per whole!– gleisin-dev
hello, but I do not want the image to take the intimate screen, what I want is it to be square, with the height of the same size as the width.
– Gustavo Henrique Begnini
see w3schools Aspect ratio 1:1
– gleisin-dev
did not give, if I put that padding-top 100% the image almost some of the screen
– Gustavo Henrique Begnini