一、示例
<html>
<head>
<title>Document</title>
</head>
<body>
<iframe src="目标.html" width="600px" height="600px" frameborder="1" scrolling="yes">
</iframe>
</body>
</html>
输出
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/925aad5acedfd891ca7287369202ad67.png)
二、属性
属性 | 选项 | 作用 |
---|
scrolling | yes no auto | 是否在 iframe 中显示滚动条 |
width | 像素 | 定义 iframe 的宽度 |
height | 像素 | 定义 iframe 的高度 |
frameborder | 1 0 | 是否显示iframe的边框 |