html - 如何使用嵌入

标签 html css wordpress

我正在尝试使用 <embed>但收效甚微。例如,这两个 URL 不会嵌入。

<embed style="width: 500px; height: 300px;" 
  src="https://www.tate.org.uk" width="300" height="150">
</embed>
<embed style="width: 500px; height: 300px;" 
  src="http://www.northlondonreadinggroup.co.uk/" width="300" height="150">
</embed>

而其他 URL 将...

https://adsler.co.uk/adsler-blog/

我遇到了这些:How Can I Bypass the X-Frame-Options: SAMEORIGIN HTTP Header?如果我将它们发布在我的站点标题中,我可以绕过 iframe 限制吗?

<script 
src="https://unpkg.com/@ungap
/custom-elements-builtin"></script>
<script type="module" src="x-frame- 
bypass.js"></script>

最佳答案

正如@showdev 提到的,您可以使用 X-Frame-Options

这是您的案例的示例:

<!DOCTYPE html>
<html>
<script src="https://unpkg.com/@ungap/custom-elements-builtin"></script>
<script type="module" src="https://unpkg.com/x-frame-bypass"></script>
<body>

<h2>HTML Iframes</h2>
<p>You can use the height and width attributes to specify the size of the iframe:</p>

<iframe is="x-frame-bypass" src="https://www.tate.org.uk" height="150" width="300"></iframe>

<iframe is="x-frame-bypass" src="http://www.northlondonreadinggroup.co.uk/" height="150" width="300"></iframe>

</body>
</html>

这是我提到的例子:(只需点击运行)

https://www.w3schools.com/code/tryit.asp?filename=G4LYCU8V9ILG

关于html - 如何使用嵌入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56406820/

相关文章:

javascript - 我如何在 CKEditor 4 中强制居中所有内容?

javascript - 在 chrome 的密码字段上使用 setCustomValidity 的不可读文本

html - 宽度为 :0; height:0; 的可悬停元素

php - 由于 noscript nginx,fail2ban 经常禁止我进入 WordPress 管理员

javascript - 如何让 chessboard.js 在本地 WordPress 上运行?

html - WordPress 永久链接环绕 block 元素

ios - 使用 CSS3 动画,iPad 2 的性能是否优于 iPad 1?

javascript - 如何将值传递给 DIV 标记中的 CLASS?

html - 获取元素符号元素的第二行作为第一部分缩进 - 而不是在元素符号下方?

css - 如何将 ionic 卡悬停在 ionic 列表中