Remove border from IFrame

2020-01-25 12:22发布

How would 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.

23条回答
聊天终结者
2楼-- · 2020-01-25 12:43

Style property can be used For HTML5 if you want to remove the boder of your frame or anything you can use the style property. as given below

Code goes here

<iframe src="demo.htm" style="border:none;"></iframe>
查看更多
太酷不给撩
3楼-- · 2020-01-25 12:43

also set border="0px "

 <iframe src="yoururl" width="100%" height="100%" frameBorder="0"></iframe>
查看更多
4楼-- · 2020-01-25 12:44

To remove border you can use CSS border property to none.

<iframe src="myURL" width="300" height="300" style="border: none">Browser not compatible.</iframe>
查看更多
家丑人穷心不美
5楼-- · 2020-01-25 12:44

Its simple just add attribute in iframe tag frameborder = 0 <iframe src="" width="200" height="200" frameborder="0"></iframe>

查看更多
狗以群分
6楼-- · 2020-01-25 12:45

Add the frameBorder attribute (Capital ‘B’).

<iframe src="myURL" width="300" height="300" frameBorder="0">Browser not compatible. </iframe>
查看更多
7楼-- · 2020-01-25 12:46

In your stylesheet add

{
  padding:0px;
  margin:0px;
  border: 0px

}

This is also a viable option.

查看更多
登录 后发表回答