国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦技巧 > html中div設(shè)置字體大小

    html中div設(shè)置字體大小

    時(shí)間: 佳洲1085 分享

    html中div設(shè)置字體大小

      html中div設(shè)置字體大小有兩種方法,下面由學(xué)習(xí)啦小編為大家整理了html中的div設(shè)置字體大小的相關(guān)知識(shí),希望對(duì)大家有幫助!

      html中div設(shè)置字體大小

      設(shè)置對(duì)象DIV字體大小或span字體大小設(shè)置有兩種方法,一種是使用style直接設(shè)置css字體大小,另外一種外部設(shè)置指定DIV內(nèi)字體大小樣式。

      html中的div設(shè)置字體大小方法一

      我們?cè)O(shè)置DIV盒子字體大小為12px,在分別標(biāo)簽內(nèi)使用style屬性設(shè)置css font-size設(shè)置字體大小樣式。

      1、對(duì)應(yīng)html源代碼片段

      <div style="font-size:12px">設(shè)置div內(nèi)字體大小為12px</div>

      html中的div設(shè)置字體大小方法二

      我們通過(guò)外部新建CSS選擇器對(duì)指定div設(shè)置文字大小樣式。

      1、實(shí)例css代碼

      <style>

      .div{font-size:14px}

      /* css注釋:設(shè)置使用對(duì)象選擇器名為“.div”的字體大小為14px */

      .span{font-size:16px}

      </style>

      2、實(shí)例對(duì)應(yīng)html代碼片段

      <div>未設(shè)置div字體大小</div>

      <div class="div">設(shè)置div字體大小為18px</div>

    3629384