如何更改嵌入式iframe的内联样式元素的CSS?

时间:2018-11-16 00:05:00

标签: jquery html css iframe

我想完全隐藏这张照片,但是我似乎不知道怎么做。链接/图片嵌入在Google Maps iframe中。我曾尝试使用jQuery隐藏它,但我一定缺少一些东西。我知道其中一些问题已被否决,但是我一直在寻找解决方案,但找不到。感谢您的所有帮助。

这是我的HTML

    <p class="text-center">
     <iframe id="frame" 
     src="//batchgeo.com/map/13c708af0e19eb8ed883c95d403986af" 
     frameborder="0" width="100%" height="550"></iframe>
    </p>

    <script>$('#frame').contents().find(".header").css("display", 
    "none");</script>

这是我检查iframe时元素的代码

    <a title="" target="_blank" href="/" class="header"><img 
    id="bgLogo" src="/images/bg-logo-only-60x60.png?v=2" width="30" 
    height="30" align="absmiddle" alt="Make maps with BatchGeo"></a>

0 个答案:

没有答案