iframe的显示和隐藏
<body>
<iframe></iframe>
</body>
iframe设置了style="z-index:-1; visilility:hiddle"
某种情况下设置iframe显示$('iframe').style.visilility='visible'; $('iframe').style.zIndex='2';
在iframe中调用父类body中的元素
parent.document.getElementByID('id').style.zIndex='-1';
总结:
1.嵌套iframe的html页面的调用
2.zIndex和z-index的使用场合和方式;
z-index对象没有position
属性,是不会工作的。
$('button').click(function() {
$('body').append("<div class='overlay'></div>");
$('table').css('zIndex', '60');
$('table').css({ 'position': 'relative' });
});
或者
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
opacity: 0.5;
z-index: 50;
}
参考网址:There