zoukankan      html  css  js  c++  java
  • 浏览器对width与height的最大值限制

    在IE8与opera10-中,数字一旦大于1342177.27,都将自动被变成1342177.27这个数,其他见下面的注释部分。

        var zooms = [
          ["256px","256px"] ,
          ["512px","512px"] ,
          ["1024px","1024px"] ,
          ["2048px","2048px"] ,
          ["4096px","4096px"] ,
          ["8192px","8192px"] ,
          ["16384px","16384px"] ,
          ["32768px","32768px"] ,
          ["65536px","65536px"] ,
          ["131072px","131072px"] ,
          ["262144px","262144px"] ,
          ["524288px","524288px"] ,
          ["1048576px","1048576px"] ,
          ["2097152px","2097152px"] ,
          ["4194304px","4194304px"] ,
          ["8388608px","8388608px"] ,
          ["16777216px","16777216px"] ,
          ["33554432px","33554432px"] ,//firefox3.6.12渲染错误,变成长方形
          ["67108864px","67108864px"] ,
          ["134217728px","134217728px"] ];//safari5.0.3, chrome10.0.6, opera10.62显示不能,失去背景色
    
        function setZoom(el,zoom) {
          var width =  zoom[0], height = zoom[1];
          el.style.width = width;
          el.style.height = height;
          el.innerHTML= "设置值为 "+ width + " x " + height
            +"
    实际值为 "+ el.style.width + " x " + el.style.height; }; function test(el){ var zoom = zooms.shift(); setZoom(el,zoom); if(zooms.length){ setTimeout(function(){ test(el) },2000); } } window.onload = function(){ var el = document.getElementById("test"); test(el); }

    http://www.techsupportforum.com/forums/f56/div-dimension-limited-by-ie8-361058.html
  • 相关阅读:
    1062 Talent and Virtue (25 分)
    1083 List Grades (25 分)
    1149 Dangerous Goods Packaging (25 分)
    1121 Damn Single (25 分)
    1120 Friend Numbers (20 分)
    1084 Broken Keyboard (20 分)
    1092 To Buy or Not to Buy (20 分)
    数组与链表
    二叉树
    时间复杂度与空间复杂度
  • 原文地址:https://www.cnblogs.com/rubylouvre/p/1932128.html
Copyright © 2011-2022 走看看