2

首先,您首先问为什么要使用框架集?

答:因为我老板告诉我的。

话虽如此,我有2个文件。Index.html 和 Head.html。

index.html 的内容:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <title>Site Title</title>
    </head>
    <frameset rows="122,*" FRAMEBORDER=NO FRAMESPACING=2 BORDER=0>
        <frame name="t" src="head.html" scrolling="no" marginheight="0" marginwidth="0">
        <frame name="b" src="http://www.website.com">
    </frameset>
    <noframes>
        <p>You have frames turned off on your browser, please turn it on and reload this page.</p>
    </noframes>
</html>

head.html 的内容:

<div style="border-bottom:2px solid #000;height:120px">
    <center>This is the frame head.</center>
</div>

该代码在除 Internet Explorer 7 和 8 之外的所有浏览器中都能正常工作(我不在乎 6)。有什么我做错了,如果没有,那么没有框架也能达到同样的效果,如果是的话怎么办?

4

2 回答 2

0

@ricebowl 如果你运行这两个页面,你会看到试图被框起来的网站根本不会出现在 IE 中,但会出现在所有其他浏览器中。

于 2010-04-17T18:06:48.810 回答
0

我在IE 7中试过,效果很好。我不知道你到底是什么问题。</p>

于 2010-08-13T10:34:19.333 回答