0

到目前为止有我的代码。问题是弹出窗口似乎在 Chrome 中运行完美,但在 Firefox 中,它在进入后粘在窗口顶部,而在 IE 中,弹出窗口甚至没有出现。

<html>
<head>

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.10.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>


</head>
<body>

<div id="dialog" title="My Dialog Title" style="display:none">
    <p>This is My Dialog box Description/Content</p>   

</div>

<script type="text/javascript">

    $(document).ready(function() {    
    setTimeout(function(){
      $(function () {
        $("#dialog").dialog({
            show: {
            effect: 'drop',
            direction : 'up',
            distance: 1000,
            duration: 2000,
            },
        });
      });
    }, 2000)
});


</script>

<style>
.ui-dialog-titlebar {display:none;}
#other_content {width:200px; height:200px;background-color:grey;}
#dialog_content{display:none;}
</style>

</body>
</html>

我希望弹出窗口的行为方式与所有浏览器在 Chrome 中的行为方式相同。

http://jsfiddle.net/fakhruddin/x39Rr/14/

网页链接

请指导。

4

2 回答 2

2

尝试添加:

<body style="height:100%">
于 2013-06-26T05:37:13.363 回答
1

解决方法很简单!添加到文件的开头:

<!DOCTYPE HTML>
于 2013-06-26T06:26:48.440 回答