0

在 Padlet 中隐藏/添加样式 使用 jQuery 嵌入 iframe,不会针对 div#surface-header.app-bar.surface-header

Padlet iframe 嵌入代码演示:

<iframe src="https://padlet.com/embed/s0ckmpcp5oauwa0z" frameborder="0" allow="camera;microphone;geolocation" style="width:100%;height:608px;display:block;padding:0;margin:0"> 
    </iframe>

Padlet 完整嵌入代码演示:

<div class="padlet-embed" style="border:1px solid rgba(0,0,0,0.1);border-radius:2px;box-sizing:border-box;overflow:hidden;position:relative;width:100%;background:#F4F4F4"><p style="padding:0;margin:0"><iframe src="https://padlet.com/embed/s0ckmpcp5oauwa0z" frameborder="0" allow="camera;microphone;geolocation" style="width:100%;height:608px;display:block;padding:0;margin:0"></iframe></p><div style="padding:8px;text-align:right;margin:0;"><a href="https://padlet.com?ref=embed" style="padding:0;margin:0;border:none;display:block;line-height:1;height:16px" target="_blank"><img src="https://resources.padletcdn.com/assets/made_with_padlet.png" width="86" height="16" style="padding:0;margin:0;background:none;border:none;display:inline;box-shadow:none" alt="Made with Padlet"></a></div></div>

4

1 回答 1

0

您不能更改 iframe 中的任何样式,除非:

1) 您拥有 iframe 的来源

2) 您的网站位于iframe-origin.com/mysite

3) iframe 允许您在包含嵌入内容的页面中插入脚本

4) 您的站点可以与iframe.com以下 CORS 规范进行通信,即通过postMessageAPI 共享数据。

以上都是非常少见的。最常见的方法通常是通过有限的公开 API,允许您自定义渲染 iframe 的特定位。

于 2020-04-24T23:14:44.457 回答