Webpage scaling and webpage scaling shortcut

Source: Internet
Author: User

Webpage scaling and webpage scaling shortcut

It is very practical to zoom in or out a webpage by means of double-finger dragging.

In fact, the zoom function can be easily implemented on the computer.

I. Scaling

1. in IE and Chrome browsers, you only need to set the scaling attribute in the style of the body element:

style="zoom:1.5;"
The zoom parameter is a magnification.

2. In Firefox, the writing method is slightly different.

-moz-transform:scale(1.5);-moz-transform-origin:top left;
The scale parameter is a magnification.

You can also write it as follows:

<body style="zoom:1.5;-moz-transform:scale(1.5);-moz-transform-origin:top left;">
Ii. Practical JavaScript slider Control for scaling Control

Use the slider of jQuery easyUI to control Scaling

<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

The effect after completion is as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.