Z
Z
zeuss562018-03-11 13:27:53
css
zeuss56, 2018-03-11 13:27:53

How to change DPI/pixel ratio/zoom/size/scale of a page via JS or CSS?

I want to make a slider to change the DPI of the site in the same way as Ctrl +and Ctrl -, since mobile browsers do not have zoom. It would also be interesting to change the DPI with a pinch gesture. Didn't google anything good :(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dom1n1k, 2018-03-11
@dom1n1k

Well, the only thing that comes to mind is to change the meta viewport tag with a script.
But I'm very unsure if this will work - it seems that this tag is only processed once on page load.
Most likely, this is not possible at all.

B
Bhudh, 2018-03-11
@Bhudh

transform: scale(sx[, sy]);
But where did you get the idea that there is no zoom in mobile browsers?
Everything is fine with two fingers and a double-tap is zoomed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question