<ruby id="tfdtx"><mark id="tfdtx"></mark></ruby>

<address id="tfdtx"><nobr id="tfdtx"><progress id="tfdtx"></progress></nobr></address>

<noframes id="tfdtx">
<form id="tfdtx"></form>

<form id="tfdtx"></form>

<sub id="tfdtx"></sub>

直播帶貨服務

section元素用于對網站或應用程序中頁面上的內容進行分塊

section元素用于對網站或應用程序中頁面上的內容進行分塊

section元素用于對網站或應用程序中頁面上的內容進行分塊,一個section元素通常由內容和標題組成。在使用section元素時,需要注意以下3點:

(1)不要將section元素用作設置樣式的頁面容器,那是div的特性。section元素并非一個普通的容器元素,當一個容器需要被直接定義樣式或通過腳本定義行為時,推薦使用div。

(2)如果article元素、aside元素或nav元素更符合使用條件,那么不要使用section元素。

(3)沒有標題的內容區塊不要使用section元素定義。

下面通過案例2-15對section元素的用法進行演示,如圖2-15所示。

例2-15 example15.html

 

<!doctype html>

 

<html>

 

<head>

 

<meta  charset="utf-8">

 

<title>section元素的使用</title>

 

</head>

 

<body>

 

<article>

 

        <header>

 

          <h2>小張的個人介紹</h2>

 

       </header>

 

    <p>小張是一個好學生,是一個帥哥……</p>

 

    <section>

 

        <h2>評論</h2>

 

        <article>

 

            <h3>評論者:A</h3>

 

            <p>小張真的很帥</p>

 

        </article>

 

        <article>

 

            <h3>評論者:B</h3>

 

            <p>小張是一個好學生</p>

 

        </article>

 

    </section>

 

</article>

 

</body>

 

</html>

 


© Copyright 六六互聯.Some Rights Reserved.www.ic.vip
三级在线看中文字幕完整版