所以这是我的基本结构。它在IE中不起作用,有什么建议吗? IE无法正常使用jPlayer状态吗?
<div id="videodiv">
<img src="poster.jpg">
<div id="video">jPLayer stuff here</div>
<button></button>
</div>
<style>
#videodiv{position:relative;}
img{z-index: 30; visibility:visible; position:relative;}
#video{z-index: 25; position:absolute; top:0px;}
button{z-index: 40; position:absolute;}
</style>
<script>
play: function (event) {
$parent.find('img.poster').css("z-index", "20");
$parent.find('img.poster').css("visibility", "hidden");
}
</script>
答案 0 :(得分:2)
为了使z-index
值工作,您需要为position:relative
之类的元素设置非静态位置。试试这个:
img {
position:relative;
z-index: 30;
visibility:visible;
}
#video {
position:relative;
z-index: 25;
}
button {
position:relative;
z-index: 20;
}