Well, I tried two scaling methods that I know of:
zoom:2;
and...
transform:scale(2);
However, although they do work (sort of), there is one major drawback: the JavaScript mouse events are ed.
I canβt figure out how to get the coordinates of the mouse, as if the page were not scaled.
In addition, I must add body{width:50%} to make sure that it does not result in huge horizontal scrolling.
On the other hand, if I simply enlarge the page using my own browser scaling, the result will be perfect. Everything looks right, mouse events work as they should, the body retains its actual width, etc.
Is there a way to make this natural browser enlargement work in CSS? If not, what kind of JavaScript should I use to ensure that the mouse coordinates are correct?
source share