Rewritten title: Adjust browser zoom
P粉674757114
P粉674757114 2023-08-20 18:58:29
0
2
461

I need to create two buttons on my website that can change the browser's zoom level ( ) (-). I chose to request browser scaling rather than CSS scaling because of image size and layout issues.

Well, is this feasible? I've heard different accounts.

P粉674757114
P粉674757114

reply all (2)
P粉824889650

May work in IE and Chrome, but not in Firefox:

 example
    P粉038856725

    I would say, it's not possible in most browsers, at least without some extra plugins. And anyway, I'd try to avoid relying on browser scaling, since implementations vary (some browsers only scale fonts, others also scale images, etc.). Unless you don't care much about user experience.

    If you need more reliable scaling, then consider using JavaScript and CSS to scale the page's fonts and images, or perhaps do the scaling server-side. This solves image and layout scaling issues. Of course, this requires more work.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!