html中的div span和frameset框架标签
生活随笔
收集整理的這篇文章主要介紹了
html中的div span和frameset框架标签
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Div和span
1.??????div獨占一層,由div九不允許有別的。
2.??????span標簽不是獨自占用一行,span一般用來設置字體。
框架標簽:
什么是框架標簽,就是把一個頁面分成很多塊,來分別顯示顯示不同的頁面,下面看一下這個例子就能完全懂了。
1.首先在同一個文件下建立如下的三個html文件。
2.分別在left,top,right文件中寫入相應的html代碼。
left:
?
<html> <head> <title></title> </head> <body bgcolor=red> <a href="http://www.baidu.com" target="right">baidu</a> <a href="http://www.cnbeta.com" target="right">cnbeta</a> </body> </html>top:
?
?
<html> <head> <title></title> </head> <body bgcolor=black> im top; </body> </html>right:
?
?
<html> <head> <title></title> </head> <body bgcolor=green> im right; </body> </html>以上代碼完全為了刻意的填充html內容。
?
下面,index里面的代碼是重頭戲:
?
<html> <head> <title></title> </head> <frameset rows="30%,*"> //frameset只能實現上下分塊(row),或者左右分塊(cols),若想實現上下左右分,則要在frameset標簽里面嵌套frameset標簽。 <frame src="top.html" noresize="noresize"/> <frameset cols="30%,*"> <frame src="left.html" noresize="noresize"/> <frame src="right.html" name="right"/> //name的作用與left頁面中a標簽的target對應,當點擊鏈接時,新的頁面將會在target中打開。 </frameset> </frameset> </html> 最終效果如圖:?
?
總結
以上是生活随笔為你收集整理的html中的div span和frameset框架标签的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 涉嫌逃税64亿元 意大利检方立案调查美国
- 下一篇: CodeAbstract