iframe的显示和隐藏以及zIndex的使用

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值