Remove border from IFrame

How do I remove the border from an iframe embedded in my web app? An example of the iframe is:

<iframe src="myURL" width="300" height="300">Browser not compatible.</iframe>

I would like the transition from the content on my page to the contents of the iframe to be seamless, assuming the background colors are consistent. The target browser is IE6 only and unfortunately solutions for others will not help.


Add the frameBorder attribute (note the capital 'B' ).

So it would look like:

<iframe src="myURL" width="300" height="300" frameBorder="0">Browser not compatible.</iframe>

After going mad trying to remove the border in IE7, I found that the frameBorder attribute is case sensitive.

You have to set the frameBorder attribute with a capital B .

<iframe frameBorder="0" ></iframe>

除了添加frameBorder属性外,您可能还需要考虑将滚动属性设置为“no”以防止出现滚动条。

<iframe src="myURL" width="300" height="300" frameBorder="0" scrolling="no">Browser not compatible. </iframe > 
链接地址: http://www.djcxy.com/p/19244.html

上一篇: 根据内容调整iframe的大小

下一篇: 从IFrame中删除边框