1
请告诉我为什么这个覆盖层不起作用。我打算在用户按下hlFeedback链接时弹出一个div。对话框覆盖层不起作用
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#hlfeedback').click(function() {
var dlg = jQuery('div#message').dialog({
width: 608,
height: 750,
modal: true,
overlay: { backgroundColor: "#000", opacity: 0.5 },
buttons: {},
open: function (event, ui) {
$(".ui-dialog-titlebar-close").hide();
}
});
dlg.parent().appendTo(jQuery("form:first"));
});
});
</script>
该div#消息工作正常,但唯一不工作的是覆盖部分。我想要有不透明度为0.5的黑色背景。什么是错的?!
即使我使用CSS2和IE 8.0吗?! – 7alhashmi
@ 7alhashmi'opacity'在IE8中不起作用,但是你可以使用'filter:alpha(opacity = 50);' –
我试过这四个,我没有得到任何东西。 background-color:#000; background:rgba(0,0,0,0.5); 不透明度:0.5; filter:alpha(opacity = 50); – 7alhashmi