天天看點

HTML學習3--架構網頁

<a href="http://blog.51cto.com/attachment/201207/162907888.png" target="_blank"></a>

2.架構的基本結構:

<a href="http://blog.51cto.com/attachment/201207/163035312.png" target="_blank"></a>

注意事項:1.架構網頁是沒有body的!!!!

&lt;html&gt; 

&lt;head&gt; 

    &lt;meta http-equiv="Content-Type" content="text/html;charset=GBK" /&gt; 

    &lt;title&gt;架構網頁-cols&lt;/title&gt; 

&lt;/head&gt; 

    &lt;frameset rows="80,*" border="5"&gt; 

        &lt;frame name="top" src="top.html"/&gt; 

        &lt;frameset cols="400,*"&gt; 

            &lt;frame name="left" src="http://www.baidu.com"/&gt; 

            &lt;frame name="right" src="http://www.google.com.hk"/&gt; 

        &lt;/frameset&gt; 

    &lt;/frameset&gt; 

&lt;/html&gt; 

注意事項:如果你想讓架構網頁之間的邊框消失,要在frame标簽中加上frameborder="0"這個屬性!!

如果你不想架構網頁之間的邊框可以被随意拖動,那麼你需要再frame标簽中加上noresize="noresize"這個屬性!

eg.

        &lt;frame name="top" src="http://www.sina.com" frameborder="0"/&gt; 

            &lt;frame name="left" src="http://www.baidu.com" frameborder="0"/&gt; 

            &lt;frame name="right" src="http://www.w3school.com.cn/" frameborder="0" noresize="noresize"/&gt; 

3.架構網頁中的超連結:

<a href="http://blog.51cto.com/attachment/201207/165253557.png" target="_blank"></a>

target="blank" → 新視窗

target="parent" → 父視窗

target="right" → 去架構中的某個name="right"的視窗。當然,還可以有left,top等。

3.當你想在普通網頁中引入其他的網頁時,可以用iframe這個标簽!

用法:

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; 

    &lt;title&gt;iframe&lt;/title&gt; 

&lt;body&gt; 

    &lt;iframe src="http://www.baidu.com" frameborder="2" width="200" height="200" scrolling="no"/&gt; 

它的一些屬性:

<a href="http://blog.51cto.com/attachment/201207/171013110.png" target="_blank"></a>

     本文轉自韓立偉 51CTO部落格,原文連結:http://blog.51cto.com/hanchaohan/927271,如需轉載請自行聯系原作者

繼續閱讀