是否可以在 HTML5 文档中包含单个框架(Frameset)?

发布于 2024-12-20 20:50:41 字数 638 浏览 2 评论 0原文

客户要求我创建一个标准 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不及他 2024-12-27 20:50:41

来自 HTML5 与 HTML4 的差异

以下元素不在 HTML5 中,因为使用它们会损害可用性和可访问性:

<前><代码>框架
框架集
无框架

您的客户想要做的事情可以在页面内完成,而无需使用框架,尽管这并不完全容易。一种方法是让内容区域具有 overflow: auto(导致其滚动)并几乎延伸到页面底部。

另一种方法是使用 position:fixed 的页脚 div。

From HTML5 differences from HTML4:

The following elements are not in HTML5 because using them damages usability and accessibility:

frame
frameset
noframes

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.

夏九 2024-12-27 20:50:41

有一个名为

...

的语义标签,您应该将其用于页脚,并具有固定位置和 ID

Theres a Semantic Tag named <footer>...</footer> you should use for Footer, with Fixed Position and ID

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文