大佬教程收集整理的这篇文章主要介绍了JQuery ui,对话框无法居中,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
POS
<script src="js/jquery-1.7.1.js"></script> <script src="js/jquery.ui.core.js"></script> <script src="js/jquery.ui.widget.js"></script> <script src="js/jquery.ui.button.js"></script> <script src="js/jquery.ui.mouse.js"></script> <script src="js/jquery.ui.resizable.js"></script> <script src="js/jquery.ui.dialog.min.js"></script> <style type="text/css" title="currentStyle"> </style> <style> </style> <script> $(function() { $('#addDialog').dialog({modal:true,buttons: { "delete all items": function() { $( this ).dialog( "close" ); },Cancel: function() { $( this ).dialog( "close" ); } },position: 'center'}); $("#resizable").resizable({ animate: true,maxWidth: 400,minWidth: 300,containment: ".fullscreen" }); }); </script> </head> <div id='addDialog' style="display: none;"> iohio </div> <body id="dt_example" style='overflow:hidden;'> <div class="fullscreen" style='overflow:hidden;'> <div style='float: left; height:90%;' id="resizable" > </div> <div id="resizable2" style='height:90%; overflow:hidden;'> <div id="container"> <div id="demo"> </div> </div> </div> </div> </body> </html>
看起来您还应该在此对话框文档中添加对UI位置的引用:http://jqueryui.com/demos/dialog/
此外,为了防止将来出现这种情况,请在此处构建下载:http://jqueryui.com/download,以便为所需功能自动下载所有依赖项.
在你的< body>中移动你的addDialog div标签
这个…
<div id='addDialog' style="display: none;"> iohio </div> <body id="dt_example" style='overflow:hidden;'>
应该
<body id="dt_example" style='overflow:hidden;'> <div id='addDialog' style="display: none;"> iohio </div>
以上是大佬教程为你收集整理的JQuery ui,对话框无法居中全部内容,希望文章能够帮你解决JQuery ui,对话框无法居中所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。