【问题标题】:Why am I having such a problem editing the font size?为什么我在编辑字体大小时遇到​​这样的问题?
【发布时间】:2010-11-24 05:07:25
【问题描述】:

我已经尝试了一些 html 变体......我想要它巨大......我知道这是基本的,但我已经尝试了一些东西

http://www.drillavailable.neighborrow.com/

<div style="text-align: center;"><br><br><br><br><br><br>
<font size="100">NO:(</font>
<br><br>no one within 3 miles of your location has listed their drill yet, be 
<a href="http://u.neighborrow.com/items/create/">the first!</a><br></div>

【问题讨论】:

    标签: html font-size


    【解决方案1】:

    使用 CSS:

    <span style="font-size: 100px">NO:(</span>
    

    font 标签大小属性的数量是别名,因此受到限制:
    http://www.w3.org/TR/CSS2/fonts.html#propdef-font-size

    可能的值是:
    [ xx-小 | x-小 |小|中 |大|超大 | xx-大]

    从1 到7 的映射。

    【讨论】:

      【解决方案2】:

      将&lt;font size="100"&gt;NO:(&lt;/font&gt; 替换为&lt;span style="font-size:100pt;"&gt;NO:(&lt;/span&gt;

      【讨论】:

        【解决方案3】:

        根据 W3c,字体大小说明符只能介于 1-7 之间。您可以尝试添加 style="font-size:100px;" 并使用像素。

        http://www.w3schools.com/tags/att_font_size.asp供参考

        【讨论】:

          【解决方案4】:
          <div style="text-align:center;">
              <span style="font-size:100pt;display:block">NO!</span>
              no one within 3 miles of your location has listed their drill yet, be 
              <a href="http://u.neighborrow.com/items/create/">the first!</a>
          </div>
          

          预览@jsfiddle

          【讨论】:

            【解决方案5】:

            在您的&lt;div&gt; 中,您可以添加style="font-size:100px" 以更改该元素内文本的字体大小。

            【讨论】:

              猜你喜欢
              • 2019-09-27
              • 2021-10-09
              • 1970-01-01
              • 1970-01-01
              • 2014-09-30
              • 2011-07-21
              • 1970-01-01
              • 2020-03-06
              • 2020-01-02
              相关资源
              最近更新 更多