设置窗口属性frame(三)
5.边框与页面内容的垂直边距marginheight
通过marginheight可以设置边框与页面内谷的垂直边距。
语法:
<frame src="页面源文件地址"marginheight="垂直边距">
说明
垂直边距用来设罝页面的上、下边缘与框架边框的距离。
举例:
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=gb2312"/> <title>设置垂直边框</title> </head> <fieldset rows="*" cols="209,*" framespacing="1" frameborder="yes" border="1"> <frame src="left.html" name="leftframe" noresize> <frame src="right.html" name="mainframe" mmarginwidth="50"> </fieldset> <noframes> <body> </body> </noframes> </html>
在代码中
<frame src="right.html" name="mainframe" mmarginwidth="50">
部分的代码标记为在右侧框架中设置边框与页面内容的垂直边距为50像素,在浏览器中预览可以看到边框与页面内容之间有很大空白,如图9.11所示。
本文内容摘取于《网页制作》,仅供参考学习用途!