从IFrame移除边框
时间:2020-03-05 18:54:05 来源:igfitidea点击:
如何从网络应用程序中嵌入的" iframe"中删除边框? iframe的一个示例是:
<iframe src="myURL" width="300" height="300">Browser not compatible.</iframe>
假设背景颜色是一致的,我希望从页面上的内容到iframe的内容的转换是无缝的。目标浏览器仅是IE6,不幸的是,其他浏览器的解决方案将无济于事。
解决方案
回答
添加frameBorder
属性(注意大写字母B)。
因此,它看起来像:
<iframe src="myURL" width="300" height="300" frameBorder="0">Browser not compatible.</iframe>
回答
除了添加frameBorder属性外,我们可能还需要考虑将scrolling属性设置为" no",以防止出现滚动条。
<iframe src="myURL" width="300" height="300" frameBorder="0" scrolling="no">Browser not compatible. </iframe >
回答
疯狂尝试删除IE7中的边框后,我发现frameBorder属性区分大小写。
我们必须使用大写字母B设置frameBorder属性。
<iframe frameBorder="0" ></iframe>