如何在 HTML 中添加一组框架?

htmlweb developmentfront end technology更新于 2024/7/31 15:08:17

使用 <frameset> 标签添加一组框架。HTML <frameset> 标签用于将窗口划分为多个框架。

注意 − HTML5 不支持此标签。请勿使用。

以下是属性 −

属性
值
描述
Cols
column size
指定列数及其宽度(以像素、百分比或相对长度为单位)。默认值为 100%
Rows
row size
指定行数及其高度(以像素、百分比或相对长度为单位)。默认值为 100%。

示例

您可以尝试运行以下代码,使用 <frameset> 标签添加一组框架。 −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML frameset Tag</title>
   </head>
   <frameset cols = "300, *">
      <frame src = "/html/menu.htm" name = "menu_page" />
      <frame src = "/html/main.htm" name = "main_page" />

      <noframes>
         <body>
            Your browser does not support frames.
         </body>
      </noframes>

   </frameset>
</html>

相关文章


有用资源