iframe
上显示了一个边框,我无法摆脱它。
IE 6 和 7 使用少量 JavaScript 即可正常工作:
function test(){
var iframe = document.getElementById('frame2');
iframe.contentWindow.document.body.style.backgroundColor = "#a31d1d";
iframe.contentWindow.document.body.style.border = "#a31d1d";
iframe.contentWindow.document.body.style.outlineColor = "#a31d1d";
}
但边框在 IE 8 中仍然可见。
最佳答案
将以下属性添加到 iframe 标记:
marginheight="0" marginwidth="0" frameborder="0"
关于javascript - IE 8 iframe 边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1625835/