Make the webpage open with 100% zoom (in IE8)

I have a website that works well with any zoom on FireFox / Chrome / Opera / Safari ... but in Internet Explorer the site looks good with only 100% zoom. in IE7 the default value is 100%, but in IE8 the default value is 125%, so if you use IE8 you need to press ctrl + 0. I used PIE.htc from http://www.css3pie.com to support CSS3 in IE.

Is there any JavaScript code or meta tag that controls the size of the view? Of course, I will use it only for IE.

+3
source share
4 answers

http://msdn.microsoft.com/en-us/library/ms531189(v=vs.85).aspx

"Windows Internet Explorer 8. -ms-zoom CSS IE8."

, , , , ( @Brad).

, , .

EDIT:. Chrome IE8 (., 100% , )

+2

, . , , .

, , , , . , - , ( ), , , .

+4
  • Chrome

    <script>
        document.firstElementChild.style.zoom = "reset";
    </script>
    
  • <script>
        $(document).ready(function () {
            $(document).keydown(function (event) {
                if (event.ctrlKey == true && (event.which == '107' || event.which == '109' || event.which == '187' || event.which == '189')) {
                    event.preventDefault();
                }
            });
    
            $(window).bind('mousewheel DOMMouseScroll', function (event) {
                if (event.ctrlKey == true) {
                    event.preventDefault();
                }
            });
        })
    </script>
    
+1

.
, "-ms-zoom" .

Apple Safari iPhone iPod:

<meta name="viewport" content="initial-scale=1.0 , minimum-scale=0.5 , maximum-scale=1.5" />

.

Mobile Firefox .
, , .

0

Source: https://habr.com/ru/post/1786006/


All Articles