我使用jquery.show()
来显示div
,但我无法看到显示效果,除非在show方法之后调用警告:
JavaScript的:
$("#screenAsLayer").show();
$("#screenAsLayer_content").show();
alert("aa");
HTML:
<div id="screenAsLayer" class="screenAsLayer"></div>
<div id="screenAsLayer_content" class="screenAsLayer_content">
<img src="..../img/....gif">
</div>
CSS:
.screenAsLayer{
display:none;
z-index:9;
position:abosolute;
}
.screenAsLayer_content{
display:none;
z-index:10;
position:abosolute;
}
答案 0 :(得分:2)
试一试:
$(document).ready(function() {
$("#screenAsLayer").show();
$("#screenAsLayer_content").show();
});