代码之家  ›  专栏  ›  技术社区  ›  rahul

页面可呈现的最大字体大小

  •  7
  • rahul  · 技术社区  · 15 年前

    网页中可呈现的最大字体大小是多少?

    它取决于机器还是应用程序(浏览器)?

    5 回复  |  直到 6 年前
        1
  •  3
  •   user25148    15 年前

    对。

    每个设备都有一组它支持的字体和字体大小。对于台式计算机来说,这两套设备都非常大,但是对于电话或其他小型设备来说,这两套设备可能相当有限。对于只有文本屏幕的设备,一种大小的字体可能只有一种。

        2
  •  4
  •   Warrior    15 年前

    它不同于浏览器。例如,Mac/IE4+不呈现指定的字体>255px.opera 5在510px之后会出现异常。Mozilla似乎能够处理高达9362px的值,而这恰好也是Netscape 4的限制。

        3
  •  2
  •   Seth Bro    14 年前

    在火狐3.6中,实际最大字体大小为2000px。计算的高度/线高上限约为2657px,进一步增加不会改变显示。

    Safari 5&chrome 6(Webkit浏览器)似乎允许大小达到(但不包括)1000000像素,之后文本将完全不呈现。

        4
  •  1
  •   Padina    6 年前

    如果使用内联SVG,chrome将把字体大小限制为8000px。以下代码将在firefox(v 59)的内联中工作。Chrome(V66)将使以下内联SVG无法读取。

    <svg id="diagrammChart"
               width="100%"
               height="100%"
               viewBox="-400000 0 1000000 550000"
               font-size="27559"
               overflow="hidden"
               preserveAspectRatio="xMidYMid meet"
    >
    <g class="hover-check">
        <text class="hover-toggle" x="-16800" y="36857.506818182" opacity="1" height="24390.997159091" width="953959" font-size="27559">
            <set attributeName="opacity" to="1" begin="ExampShow56TestBarRect1.touchstart"
                 end="ExampShow56TestBarRect1.touchend">
            </set>
            <set attributeName="opacity" to="1" begin="ExampShow56TestBarRect1.mouseover"
                 end="ExampShow56TestBarRect1.mouseout">
            </set>
            Heinz: -16800
        </text>
        <rect class="hover-rect" x="-16800" y="12466.509659091" width="16800" height="24390.997159091" fill="darkred">
            <set attributeName="opacity" to="0.1" begin="ExampShow56TestBarRect1.mouseover"
                 end="ExampShow56TestBarRect1.mouseout">
            </set>
            <set attributeName="opacity" to="0.1" begin="ExampShow56TestBarRect1.touchstart"
                 end="ExampShow56TestBarRect1.touchend">
            </set>
        </rect>
        <rect id="ExampShow56TestBarRect1" x="-384261" y="0" width="953959" height="48781.994318182"
              opacity="0">
        </rect>
    
    </g>
    </svg>
    
        5
  •  0
  •   Daan    15 年前

    可能两者都有。它还取决于查看网页的监视器的大小。您想知道的任何特定应用程序?