如何从嵌入在web应用程序中的iframe中删除边框?iframe的一个示例是:

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

我希望从页面上的内容到iframe内容的转换是无缝的,假设背景颜色是一致的。目标浏览器仅为IE6,不幸的是,针对其他浏览器的解决方案将无济于事。


当前回答

使用此

style="border:none;

例子:

<iframe src="your.html" style="border:none;"></iframe>

其他回答

添加frameBorder属性(注意大写“B”)。

所以它看起来像:

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

对我来说,添加非常有效

.iframe{
box-shadow: none !important;
}

这个解决方案特别适用于我正在编辑的shopify主题。shopify主题在整个主题中以不同的方式使用iframe,其中一个出现了故障。我不得不手动进入css并覆盖css属性。

使用此

style="border:none;

例子:

<iframe src="your.html" style="border:none;"></iframe>
<iframe src="URL" frameborder="0" width="100%" height="200">
<p>Your browser does not support iframes.</p>
</iframe>

<iframe frameborder="1|0">

(OR)

<iframe src="URL" width="100%" height="300" style="border: none">Your browser 
does not support iframes.</iframe>

The <iframe> frameborder attribute is not supported in HTML5. Use CSS 
instead.

Try

<iframe src="url" style="border:none;"></iframe>

这将删除框架的边框。