Controls with no control window is divided into window controls, window controls without very good run, such as flash control, block DIV layer can be solved this problem by adding wmode attribute code is added as follows:
Solve windowless control block DIV:
1
|
<param name=
"wmode"
value=
"opaque"
>
|
Test code is:
Test DIV and OCX controls:
1
2
3
4
5
6
7
8
9
10
11
12
|
<div
style=
"position: absolute; left: 120; top: 450; width: 400px; height: 200px; background: red; z-index: 7"
>
<object classid=
"CLSID:4B5BEE59-EDD2-4082-A9F7-D65E1CA20FA7"
width=
"100"
height=
"100"
>
</object>
是第6层
</div>
<div
style=
"position: absolute; left: 40; top: 500; width: 400px; height: 100px; background: Blue; z-index: 9"
>
这是第7层
</div>
这是第7层
</div>
|
NOTE: If we control is a non-flash control such as window controls, block DIV layer can solve this problem by adding wmode attribute code is added as follows:
1
|
<param name=
"wmode"
value=
"opaque"
>
|
Html's iframe, frame can block the OCX - actually iframe and frame itself is a window element, there is between the window elements can block each other, and our Div and can block each other with iframe window. The question now becomes how to block the OCX DIV block iframe window and then use iframe.
OCX control block with iframe
1
2
3
4
5
6
7
8
9
10
11
12
|
<div
style=
"position: absolute; left: 120; top: 450; width: 400px; height: 200px; background: red; z-index: 7"
>
<object classid=
"CLSID:4B5BEE59-EDD2-4082-A9F7-D65E1CA20FA7"
width=
"100"
height=
"100"
>
</object>
是第6层
</div>
<div
style=
"position: absolute; left: 40; top: 500; width: 400px; height: 100px; background: Blue; z-index: 9"
>
<iframe id=
'iframei'
src=
"javascript:false"
style=
"position:absolute; visibility:inherit; top:0px; left:0px; height:'100%';width:'100%'; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';/"
>
</iframe>;
这是第7层
</div>
|
Wherein the code:
1
2
3
|
<iframe id=
'iframei'
src=
"javascript:false"
style=
"position:absolute; visibility:inherit;
top:0px; left:0px; height:'100%';width:'100%'; z-index:-1;
filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';/"
></iframe>;”
|