Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何摆脱讨厌的iframe边界?_Html_Css_Iframe - Fatal编程技术网

Html 如何摆脱讨厌的iframe边界?

Html 如何摆脱讨厌的iframe边界?,html,css,iframe,Html,Css,Iframe,小提琴(它是我实际代码的骨架): 代码: CSS HTML 当我在Chrome中运行实际代码时,它显示为灰色边框,如图所示: 只需在CSS中添加以下内容: iframe{ 边界:0; } 请参阅下面的代码片段: *{ -webkit框大小:边框框; -moz框大小:边框框; 框大小:边框框; 保证金:0; 填充:0; } html{ 身高:100%; } 身体{ 身高:100%; 背景:#FEFFFB; 字体系列:arial,verdana; } /*将此添加到下面*/ iframe{

小提琴(它是我实际代码的骨架):
代码:
CSS

HTML


当我在Chrome中运行实际代码时,它显示为灰色边框,如图所示:

只需在CSS中添加以下内容:

iframe{
边界:0;
}
请参阅下面的代码片段:

*{
-webkit框大小:边框框;
-moz框大小:边框框;
框大小:边框框;
保证金:0;
填充:0;
}
html{
身高:100%;
}
身体{
身高:100%;
背景:#FEFFFB;
字体系列:arial,verdana;
}
/*将此添加到下面*/
iframe{
边界:0;
}
/*结束*/
#布局容器{
宽度:100%;
身高:100%;
顶部:0px;
左:0px;
位置:固定;
}
#iframeHeader{
宽度:100%;
高度:50px;
边界:0;
}
#iframeStatusBar{
宽度:100%;
高度:15px;
边界:0;
}
#iFrameMain菜单{
宽度:200px;
身高:100%;
}
#iframeCenterContent{
宽度:100%;
身高:100%;
顶部:65px;
左:200px;
位置:固定;
}
#iframeFooter{
宽度:100%;
高度:50px;
底部:0px;
左:200px;
位置:固定;
}

css
文件
iframe{border:none;}
中应用此代码

并检查下面的链接


另一种方法是使用frameBorder=“0”,我看到您尝试过这个方法,但错过了大写字母“B”

您尝试过收到的解决方案吗?当然,我尝试过这些解决方案。这就是为什么我说现有的答案没有帮助。你能给出这个网站的链接吗?正如你所看到的,我的代码片段正在运行。我刚刚在谷歌上搜索了我的问题所在的同一句话。如果IE中的
frameborder
属性不适合你,我模糊地记得,一些版本坚持使用大写B的
frameborder
frameborder
不区分大小写。
* 
{
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0; padding: 0;
}
html
{
    height: 100%;
}
body 
{
    height: 100%;
    background: #FEFFFB;
    font-family: arial, verdana;   
}
#layoutContainer 
{
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    position: fixed;
}

#iframeHeader
{
    width: 100%;
    height: 50px;
    border: 0;
}
#iframeStatusBar
{
    width: 100%;
    height: 15px;
    border: 0;
}
#iframeMainMenu
{
    width: 200px;
    height: 100%;
}
#iframeCenterContent
{
    width: 100%;
    height: 100%;
    top: 65px;
    left: 200px;
    position: fixed;
}
#iframeFooter
{
    width: 100%;
    height: 50px;
    bottom: 0px;
    left: 200px;
    position: fixed;
}
<div id="layoutContainer">
    <iframe id="iframeHeader" src="#" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0"></iframe>
    <iframe id="iframeStatusBar" src="#" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0"></iframe>
    <iframe id="iframeMainMenu" src="#"></iframe>
    <iframe id="iframeCenterContent" src="#"></iframe>
    <iframe id="iframeFooter" src="#"></iframe>            
</div>