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

时间:2017-09-01 15:57:13

标签: javascript css jquery-ui dialog

我认为这是一个CSS错误。我下载了jqueryui对话框示例代码(显示在jquery站点中的广告),将其存储在记事本中,并使用各种浏览器指向它,但样式是错误的。没有标题栏,没有X按钮,但标题文本确实出现,标有"关闭"出现。周围没有箱子。看起来文本和关闭按钮位于现有内容的顶部。是可拖动的,关闭按钮工作,所以功能正常。

以下是来自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>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

这里的X按钮显示正常,如果你在本地使用jquery ui,你必须添加图像文件夹