Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css jQueryUI:样式表的本地和远程包含之间的差异_Css_Jquery Ui - Fatal编程技术网

Css jQueryUI:样式表的本地和远程包含之间的差异

Css jQueryUI:样式表的本地和远程包含之间的差异,css,jquery-ui,Css,Jquery Ui,当我远程为一个可调整大小的jQueryUI对话框包含一个jQueryUI样式表时,就像这样 <link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/start/jquery-ui.css" /> <link rel="stylesheet" t

当我远程为一个可调整大小的jQueryUI对话框包含一个jQueryUI样式表时,就像这样

<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/start/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="./jquery-ui.css" />

我得到这个结果:

但是当我下载同一个文件并像这样在本地包含它时

<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/start/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="./jquery-ui.css" />

我得到这个结果:

请注意,右下角缺少调整大小手柄,这似乎是唯一的区别


是什么导致了这种差异?

jqueryui引用了一堆图像精灵表。当包含来自ajax.googleapis.com的引用时,图像的路径会正确解析,因为谷歌将这些图像托管在其服务器上,并将它们放置在正确的位置。但是,在jquery-ui.css的本地副本中,我猜您的图像很可能不在正确的位置

我在当前项目中使用jquery ui,我的文件夹结构是:

Content
  images            <--- this is the jquery ui sprite iamges folder
  jquery-ui.css
内容

图像转到/jquery ui.css并确保bg路径正确

看起来按钮也有渐变…我认为您只需要转到:/jquery-ui.css并确保bg路径正确您缺少位于文件夹中的图像文件。使用并下载该类。确保添加所有文件。我猜我的答案没有赢:(