是否可以在 HTML5 文档中包含单个框架(Frameset)?
客户要求我创建一个标准 HTML5 模板,但包含一个框架(框架集而不是 iframe)用作页脚。
我只使用过框架几次,所以我真的不知道这是否可能。
这是我需要的一个非常简单的例子
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="description" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="content">
<!-- ALL CONTENT GOES HERE -->
</div>
<!-- FOOTER FRAME WOULD GO HERE -->
</body>
</html>
I've been asked by a client to create a standard HTML5 template but include a frame (Frameset not iframe) to use as the footer.
I've only worked with frames a handful of times so I don't really know if it's possible or not.
Here's a very simple example of what I need
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="description" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="content">
<!-- ALL CONTENT GOES HERE -->
</div>
<!-- FOOTER FRAME WOULD GO HERE -->
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自 HTML5 与 HTML4 的差异:
您的客户想要做的事情可以在页面内完成,而无需使用框架,尽管这并不完全容易。一种方法是让内容区域具有
overflow: auto
(导致其滚动)并几乎延伸到页面底部。另一种方法是使用
position:fixed
的页脚 div。From HTML5 differences from HTML4:
what your client wants to do can be done within the page without using frames, even though it's not completely easy. One approach would be to have a content area that has
overflow: auto
(causing it to be scrolled) and stretches almost to the bottom of the page.Another approach is to have a footer div that is
position: fixed
.有一个名为
的语义标签,您应该将其用于页脚,并具有固定位置和 ID
Theres a Semantic Tag named
<footer>...</footer>
you should use for Footer, with Fixed Position and ID