如何修复 Instagram 嵌入错误

发布于 2025-01-16 01:25:47 字数 1525 浏览 2 评论 0原文

我正在使用基本的 html-css-js 和 tailwind 为我的学生组织硬编码一个网站,在网站中我插入了一些来自 instagram 的嵌入内容,但由于某种原因,它一直像这样

bugged instagram嵌入

有谁知道如何解决这个问题?通常它应该看起来像这样

在此处输入图像描述

.ig-embed {
  @apply block max-w-full overflow-hidden mb-2;
}
<div class="ig-embed">
  <iframe class="instagram-media instagram-media-rendered" id="instagram-embed-0" src="https://www.instagram.com/p/CauLOXop4hS/embed/?cr=1&amp;v=14&amp;wp=652&amp;rd=http%3A%2F%2F127.0.0.1%3A5501&amp;rp=%2F#%7B%22ci%22%3A0%2C%22os%22%3A159.59999999403954%2C%22ls%22%3A141.90000000596046%2C%22le%22%3A142.80000001192093%7D"
    allowtransparency="true" allowfullscreen="true" frameborder="0" height="612" data-instgrm-payload-id="instagram-media-payload-0" scrolling="no" style="background: white; max-width: 540px;  width: calc(100% - 2px); border-radius: 3px; border: 1px solid rgb(219, 219, 219); box-shadow: none; display: block; margin: 0px 0px 12px; min-width: 256px; padding: 0px;"></iframe>
  <script
    async src="//www.instagram.com/embed.js"></script>
</div>

添加了一些片段希望有所帮助

I'm hard-coding a website for my student organisation using basic html-css-js and tailwind, in the website I inserted some embeds from instagram, but for some reason it keeps bugging out like so

bugged instagram embed

Does anyone know how to fix this? it should look like this normally

enter image description here

.ig-embed {
  @apply block max-w-full overflow-hidden mb-2;
}
<div class="ig-embed">
  <iframe class="instagram-media instagram-media-rendered" id="instagram-embed-0" src="https://www.instagram.com/p/CauLOXop4hS/embed/?cr=1&v=14&wp=652&rd=http%3A%2F%2F127.0.0.1%3A5501&rp=%2F#%7B%22ci%22%3A0%2C%22os%22%3A159.59999999403954%2C%22ls%22%3A141.90000000596046%2C%22le%22%3A142.80000001192093%7D"
    allowtransparency="true" allowfullscreen="true" frameborder="0" height="612" data-instgrm-payload-id="instagram-media-payload-0" scrolling="no" style="background: white; max-width: 540px;  width: calc(100% - 2px); border-radius: 3px; border: 1px solid rgb(219, 219, 219); box-shadow: none; display: block; margin: 0px 0px 12px; min-width: 256px; padding: 0px;"></iframe>
  <script
    async src="//www.instagram.com/embed.js"></script>
</div>

Added some snippets to hopefully help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文