T
T
Taranas2020-02-15 19:16:07
css
Taranas, 2020-02-15 19:16:07

How to adjust the size of sprites for different phone screen resolutions?

For example, I need to place 3 sprites at the top of a canvas element. How can I make these sprites grow/shrink with the canvas when the resolution changes, instead of staying the same size?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lara B, 2019-06-11
@NikitaFedorov

try to set a pseudo-element after on the div with the picture, make it 100% wide, position it as an absolute at the bottom, set some height (you need to choose the right one) and set the border-radius

G
GavriKos, 2020-02-15
@GavriKos

In the canvas, all the same, not sprites, but Image.
And you need to use CanvasScaler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question