簡體   English   中英

試圖從 Pinterest “嵌入 pin” 中刪除標題和個人資料

[英]Trying to remove title and profile from Pinterest “embed pin”

我正在嘗試向我的網站添加 Pinterest“嵌入圖釘”,但不希望看到任何標題或個人資料信息。 我只希望單個圖像具有 hover 按鈕,而不是同一頁面上的其他圖像。

我嘗試使用和修改 Pinterest 上提供的代碼:

<script type="text/javascript" async defer src="//assets.pinterest.com/js/pinit.js"></script>
<a data-pin-do="embedPin" href="https://www.pinterest.com/pin/99360735500167749/"></a>

<iframe src="https://assets.pinterest.com/ext/embed.html?id=99360735500167749" height="454" width="236" frameborder="0" scrolling="no" ></iframe>

我一直在擺弄這個幾個小時,根本沒有取得任何進展。 任何幫助將不勝感激!

例子

iframe 可能是一個棘手的元素。 An iframe is basically an embedded web page of it's own, meaning inside the iframe you have new html, a new body tag etc. This is why any css you apply on your own page won't affect your iframe.

設置 iframe 樣式的唯一方法是使用 javascript 在 iframe 本身內插入樣式表。 然后你可以使用 css 來定位你想要隱藏的元素,就像你通常做的那樣(例如display:none )因為你的 javascript 需要“插入”這個,你需要把任何和所有 ZC7A628CBA22E28EB6AEB7A 里面function。

上次我遇到了類似的問題,我使用了這個參考,它會一步一步告訴你如何 go 關於這個: https://redstapler.co/how-to-apply-css-to-iframe/

這是假設您具有 css 技能來更改和設置這些元素的樣式。 如果您還沒有,我建議您閱讀 css 並先練習。

祝你好運!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM