Personally I think this is a bad idea; either design your site so it scales easily (not hard with proper CSS/HTML techniques) or just allow the user to do what they want (maybe they already have their browser zoomed or they use low resolution). Typically you should not make UX decisions for people.
But it is possible.
Demo: http://jsfiddle.net/q6kebgbh/4/
.zoom {
zoom: 2;
-moz-transform: scale(2);
-moz-transform-origin: 0 0;
}
Note that previous versions of this answer used transform
to support more browsers. However, this shortened code appears to work for current versions of Chrome, FF, Safari and IE (as well as previous versions of IE, which have supported zoom
for a long time).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…