用户:yamol查看:0 回复:2 评论:0 创建时间:2019-01-24T14:58:26
添加 iframe 的语法
<iframe src="URL"></iframe>
URL 指向隔离页面的位置。
Iframe - 设置高度和宽度
height 和 width 属性用于规定 iframe 的高度和宽度。
属性值的默认单位是像素,但也可以用百分比来设定(比如 "80%")。
<iframe src="https://ide.codemao.cn/we/5222339" width="800" height="500"></iframe>
↑↑↑我给他加了一个宽7px的紫色实线边框
<iframe src ="https://ide.codemao.cn/we/5222339"></iframe>这个是我直接在作品的右边获得的链接,发现没有?你们可以直接在这个链接中插入宽高的设置,甚至可以做其他的“style”,嘿嘿,要不要试试???
怎么样,是不是和社区帖子里插入作品是一样的东西?哈哈,就是这么奇妙的缘分~
接下来呢,我会把这个插入链接:<iframe src="https://ide.codemao.cn/we/5222339" style="border:purple 7px solid;"></iframe>,大家看看有没有变化~~~
啊啊啊啊~~~~没有变化~~~~看来编程猫的防注入还是做得不错的~
使用 iframe 作为链接的目标
iframe 可用作链接的目标(target)。
链接的 target 属性必须引用 iframe 的 name 属性:
<iframe src="https://ide.codemao.cn/we/5222339" width="800" height="500" name="yamol"></iframe>
<p><a href="https://ide.codemao.cn/we/4226213" target="yamol">回忆经典-吃豆人</a></p>
和上一期的《框架》一样,这个也是可以用name和target来做出指定区域跳转的效果。