问题
If I open my web site in a browser and pres Ctrl +
several time everything gets bigged and the site looks better to me.
Can I achieve the same effect by putting something in the HTML code (so that the users see everything bigger by default, without pressing Ctrl+
)?
I want to make everything bigger (text and images).
回答1:
If you want to achieve the same effect that the browser zoom, you can use the CSS zoom
property (and the transform scale(x)
property for Firefox) on the body
:
body {
-moz-transform: scale(1.3); /* for Firefox, default 1*/
zoom:130%; /* For Chrome, IE, default 100%*/
}
But, I'm not sure if this is a good solution. If you think your website looks better when zoomed in, then there is a real design issue somewhere. I would suggest you to rework the design first.
来源:https://stackoverflow.com/questions/28605730/how-to-make-everything-bigger-on-the-page