Scaling Web Pages Proportionally with CSS
Enlarging web pages in browsers can be performed with key combinations or browser-specific methods. In Firefox, for instance, pressing CTRL proportionally scales the entire page. This question prompts, "Is there a way to achieve similar functionality solely using CSS?"
The answer lies in the CSS zoom property. Supported by browsers such as IE 5.5 , Opera, Safari 4, and Chrome, zoom offers a solution for scaling web pages in a proportionate manner. However, Firefox does not support zoom.
As an alternative for Firefox, the proprietary -moz-transform property in Firefox 3.5 can be employed. A possible CSS code to implement this scaling could be:
div.zoomed { zoom: 3; -moz-transform: scale(3); -moz-transform-origin: 0 0; }
The above is the detailed content of Can CSS Alone Proportionally Scale Web Pages?. For more information, please follow other related articles on the PHP Chinese website!