简体   繁体   English

jqueryui对话框缺少标题栏,“ x按钮”和环绕对话框

[英]jqueryui dialog missing title bar, “x button” and surround dialog box

I assume this is a CSS error. 我认为这是CSS错误。 I downloaded the jqueryui dialog example code, (which displays as advertised in the jquery site) store it in notepad and point to it with various browsers, but the styling is wrong. 我下载了jqueryui对话框示例代码(在jquery站点中显示为广告),将其存储在记事本中,并使用各种浏览器指向它,但是样式错误。 There is no title bar, there is no X button, however the title text does appear and a button labeled "close" appears. 没有标题栏,没有X按钮,但是标题文本确实出现,并且出现了标有“关闭”的按钮。 There is no surrounding box either. 也没有周围的盒子。 Looks like the text and close button are sitting on top of the existing content. 看起来文本和关闭按钮位于现有内容的顶部。 Is is draggable,close button works, so functionality is ok. 是可拖动的,关闭按钮起作用,所以功能还可以。

Here is the code take from the jqueryui site. 这是来自jqueryui站点的代码。

  <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery UI Dialog - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $( "#dialog" ).dialog(); } ); </script> </head> <body> <div id="dialog" title="Basic dialog"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> </div> </body> </html> 

X按钮在这里显示正常,如果您在本地使用jQuery UI,则必须添加images文件夹

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM