[英]HTML Removing Background from within Iframe
I'm wondering if there is any way to remove background color from within Iframe original site.. It is only a white color. 我想知道是否有任何方法可以从Iframe原始网站中删除背景颜色..它只是一种白色。 Can I use javascript??
我可以使用javascript吗?
尝试这个
document.getElementById("YourIframeId").contentWindow.document.body.style.backgroundColor="blue";
if the iframe have the same domain as your page you can achieve this via javascript, with something like this 如果iframe与您的网页具有相同的域名,您可以通过javascript实现此目的,就像这样
document.getElementById('IFRAMEID').contentDocument.body.style.background = "transparent";
then you'll need to add the transparency attribute to the iframe 然后你需要将transparent属性添加到iframe
ALLOWTRANSPARENCY="true"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.