gpt4 book ai didi

css - 如何从我的 wordpress 网站中的 iframe 中删除 png 透明度

转载 作者:太空宇宙 更新时间:2023-11-04 05:02:04 24 4
gpt4 key购买 nike

白色背景环绕着我的 iframe,因为我从数据库中回显了这个 iframe,尽管它在除 IE8、IE9 之外的所有其他浏览器中都能正确显示(请检查屏幕截图)。虽然我在我的 header.php 中尝试了这个脚本,因为网站在 wordpress 上,但仍然没有运气(包括 js 文件夹下的 ie6pngfix.js)。让我知道如何解决这个问题。

<!--[if IE 6]>
<script type="text/javascript" src="js/ie6pngfix.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('img, ul, ol, li, div, p, a, h1, h2, h3, h4, h5, h6, png, span');
</script>
<![endif]-->

详情如下--

<div id="banner_right">
<iframe width="483" height="300" src="http://www.youtube.com/embed/EDPYq4BFHBI" frameborder="0" allowfullscreen></iframe>
</div>

#banner_right iframe{background:url(images/bg.png) 0 0 no-repeat;padding: 20px 13px 27px;}

bg.png510X351 px

正确的屏幕截图,除 IE8-9 之外的所有屏幕截图——(无白色背景) enter image description here

屏幕截图不正确,IE8-9 --(带白色背景) enter image description here

最佳答案

自己找到答案 --

allowtransparency="true" 添加到 iframe 代码。

<iframe width="483" height="300" src="http://www.youtube.com/embed/EDPYq4BFHBI" frameborder="0" allowtransparency="true"></iframe>

然后将 background-color:transparent; 添加到我的 css--

#banner_right iframe{background:url(images/bg.png) 0 0 no-repeat;padding: 20px 13px 27px; background-color:transparent; }

关于css - 如何从我的 wordpress 网站中的 iframe 中删除 png 透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11305242/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com