html复习三
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://hanchaohan.blog.51cto.com/2996417/927271
1.框架的基本概念:http://www.w3school.com.cn/
2.框架的基本结构:
注意事项:1.★框架网页是没有body的!!!!
- <html>
- <head>
- <metahttp-equiv="Content-Type"content="text/html;charset=GBK"/>
- <title>框架网页-cols</title>
- </head>
- <framesetrows="80,*"border="5">
- <framename="top"src="top.html"/>
- <framesetcols="400,*">
- <framename="left"src="http://www.baidu.com"/>
- <framename="right"src="http://www.google.com.hk"/>
- </frameset>
- </frameset>
- </html>
注意事项:★如果你想让框架网页之间的边框消失,要在frame标签中加上frameborder="0"这个属性!!
★如果你不想框架网页之间的边框可以被随意拖动,那么你需要再frame标签中加上noresize="noresize"这个属性!
eg.
- <html>
- <head>
- <metahttp-equiv="Content-Type"content="text/html;charset=GBK"/>
- <title>框架网页-cols</title>
- </head>
- <framesetrows="80,*"border="5">
- <framename="top"src="http://www.sina.com"frameborder="0"/>
- <framesetcols="400,*">
- <framename="left"src="http://www.baidu.com"frameborder="0"/>
- <framename="right"src="http://www.w3school.com.cn/"frameborder="0"noresize="noresize"/>
- </frameset>
- </frameset>
- </html>
3.框架网页中的超链接:
target="blank" → 新窗口
target="parent" → 父窗口
target="right" → 去框架中的某个name="right"的窗口。当然,还可以有left,top等。
3.当你想在普通网页中引入其他的网页时,可以用iframe这个标签!
用法:
- <htmlxmlns="http://www.w3.org/1999/xhtml">
- <head>
- <metahttp-equiv="Content-Type"content="text/html;charset=GBK"/>
- <title>iframe</title>
- </head>
- <body>
- <iframesrc="http://www.baidu.com"frameborder="2"width="200"height="200"scrolling="no"/>
- </html>
它的一些属性:
本文出自 “我的JAVA世界” 博客,请务必保留此出处http://hanchaohan.blog.51cto.com/2996417/927271