• <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>

    怎樣讓DIV中的內容居中

    HTML中可以設置文字或內容居中對齊。下面,我們來看看怎樣讓DIV中的內容居中吧。

    操作方式

    • 01

      隨便寫上文字
      先打開visual studio軟件,然后在div中隨意寫上文字,如下圖所示:

    • 02

      程度居中代碼
      然后在style中寫上程度居中代碼body{text-align: center;},如下圖所示:

    • 03

      div內容居中對齊的代碼,text-align:center;如下圖所示:

    • 04

      預覽結果
      然后在瀏覽器中預覽結果,如下圖所示:

    • End
    • 發表于 2018-07-28 00:00
    • 閱讀 ( 771 )
    • 分類:科學教育

    你可能感興趣的文章

    相關問題

    0 條評論

    請先 登錄 后評論
    聯系我們:uytrv@hotmail.com 問答工具
  • <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>
    久久久久精品国产麻豆