Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.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是透明的,Iframe内部的表单元素可以在Chrome中编辑_Html_Css_Google Chrome_Iframe_Transparency - Fatal编程技术网

HTML:Iframe是透明的,Iframe内部的表单元素可以在Chrome中编辑

HTML:Iframe是透明的,Iframe内部的表单元素可以在Chrome中编辑,html,css,google-chrome,iframe,transparency,Html,Css,Google Chrome,Iframe,Transparency,我用HTML4.0尝试了一些代码 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <body> <iframe marginwidth="0" marginheight="0" scrolling="yes" noresize frameborder="1" name="HEADER" src="1.html" style="position:absolute;

我用HTML4.0尝试了一些代码

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<iframe marginwidth="0" marginheight="0" scrolling="yes" noresize frameborder="1" 
name="HEADER" src="1.html" style="position:absolute; top:0; left:0; width:100%; height:100%;
z-index:3 ;" ALLOWTRANSPARENCY="true">
</iframe>
<iframe id="ifrm_contract" marginwidth="0" marginheight="0" scrolling="yes" frameborder="1"
name="CONTRACT" src="2.html" style="position:absolute;top:211;left:0;width:100%;height:30%;
z-index:2;"  ALLOWTRANSPARENCY="true">
</iframe>
<iframe marginwidth="0" marginheight="0" scrolling="yes" frameborder="1" noresize
name="CONTENT" src="3.html" style="position:absolute;top:356;left:0;width:100%; height:50%;
z-index:1;" ALLOWTRANSPARENCY="true">
</iframe>
</body>
</html>

1.html和3.html是包含静态内容的简单html文件。 但是2.html在html文件的中心有一个按钮。 以下是我的观察结果。

A> 在IE 8中,代码工作正常。2.html中的按钮是可编辑的(意味着用户可以单击它)。同样在IE 8中,“allowtransparency”属性工作正常。

B> 在Chrome/Safari中,“allowtransparency属性不起作用。但是默认情况下,Chrome 2.html和3.html中的属性是透明的,尽管它们的z-index属性是但我的问题是2.html中的按钮不可编辑或用户无法单击。它将被禁用。

注意:根据我的要求,我必须使用height=100%将1.html的高度保持为100%

请建议任何CSS解决方案来纠正此问题。

同时添加2.html的代码段




可以将css用于iframe,类似于

iframe{
不透明度:0.4;
过滤器:alpha(不透明度=40);/*适用于IE8及更早版本*/
}


不透明度可以取0.0-1.0之间的值,因此我似乎无法重现您的问题,一切都对我有效,我甚至将按钮更改为Jquery按钮,而且一切似乎都很好,所以我不确定是否真的,希望其他人能帮上忙,或者欢迎您通过电子邮件将文件发送给我,我来看看,但就使用您给出的代码重新创建而言,它似乎是可行的


几乎完全使用了您提供的代码,甚至尝试更改按钮类型,所有操作都很好。

我的问题是我无法在Chrome中单击2.html(即第二个iframe)中的按钮,IE中的代码工作正常,按钮也可单击。因此,需要共享2.html的code属性才能解决此问题,因为您提供的代码没有任何按钮,只有iframe本身。您需要共享2.html中的代码,以便我们查看、尝试和帮助。在问题中添加了2.html代码。这只是一个带有一次按钮的简单代码。我的目标是通过单击按钮启用它并执行一些简单的事件处理。