+ -
当前位置:首页 → 问答吧 → 【html框架】如何让框架在窗口中居中

【html框架】如何让框架在窗口中居中

时间:2011-07-27

来源:互联网

HTML code


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>无标题页</title>
</head>
    <frameset rows="180px,*"  frameborder="no" frameborder="1" framespacing="0" >
    <frame src="top.aspx" scrolling="no" frameborder="NO" name="topFrame" marginwidth="0" marginheight="0" target="tops" />
    <frameset cols="142px,738px"   id="frame">
    <frame src="left.aspx" name="leftFrame" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="lefts" />
    <frame src="Gifts.aspx" name="show" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="show" />
    </frameset>
  <body>  
  </body>

</html>


作者: cupsBing   发布时间: 2011-07-27

HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{margin:0; padding:0;}
</style>
</head>

<body>
    <div style="width:100%; min-width:1002px;">
    <div style="width:1002px; margin:0 auto;">
    <frameset rows="180px,*"  frameborder="no" frameborder="1" framespacing="0" >
    <frame src="top.aspx" scrolling="no" frameborder="NO" name="topFrame" marginwidth="0" marginheight="0" target="tops" />
    <frameset cols="142px,738px"   id="frame">
    <frame src="left.aspx" name="leftFrame" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="lefts" />
    <frame src="Gifts.aspx" name="show" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="show" />
    </frameset>
    </frameset>
    </div>
    </div>

</body>
</html>

作者: MuBeiBei   发布时间: 2011-07-27

如果把框架放入body中,没办法显示
HTML code

<frameset rows="180px,*"  frameborder="no" frameborder="1" framespacing="0" >
    <frame src="top.aspx" scrolling="no" frameborder="NO" name="topFrame" marginwidth="0" marginheight="0" target="tops" />
    <frameset cols="142px,738px"   id="frame">
    <frame src="left.aspx" name="leftFrame" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="lefts" />
    <frame src="Gifts.aspx" name="show" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="show" />
    </frameset>
    </frameset>


作者: cupsBing   发布时间: 2011-07-27

把body删了。。。

作者: MuBeiBei   发布时间: 2011-07-27

还是不行。。。。

作者: cupsBing   发布时间: 2011-07-27

引用 4 楼 cupsbing 的回复:
还是不行。。。。


HTML code
<frameset cols="*,1024,*"  frameborder="no" frameborder="1" framespacing="0" >
    <frame src="about:blank"></frame>
    <frame src="top.aspx" scrolling="no" frameborder="NO" name="topFrame" marginwidth="0" marginheight="0" target="tops" />
    <frameset cols="142px,738px"   id="frame">
    <frame src="left.aspx" name="leftFrame" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="lefts" />
    <frame src="Gifts.aspx" name="show" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="show" />
    </frameset>
    <frame src="about:blank"></frame>
    </frameset>

作者: MuBeiBei   发布时间: 2011-07-27

居中了,但是

框架“上,左,右”的格局出错了

作者: cupsBing   发布时间: 2011-07-27