问题描述
我正在尝试首次安装带有ThemeRoller主题的jQuery UI.我已经下载了jquery 1.4.2 ...我已经下载了带有两个主题的jQuery UI.我已尝试按照说明进行操作,但它们似乎矛盾,并且似乎与下载的文件无关.
I'm trying to install jQuery UI with a ThemeRoller theme for the first time. I've downloaded jquery 1.4.2... I've downloaded jQuery UI with a couple of themes. I've tried to follow the instructions but they seem contradictory and don't seem to related to the downloaded files.
当我尝试使用日期选择器时...日期选择器功能可以使用,但是具有默认的(灰色)样式.
When I try to use a datepicker... the datepicker functionality works, but it has the default (grey) style.
此页面指的是不包含以下内容的文件夹/子文件夹/css文件不存在.该页面引用了一个不存在的ui.theme.css文件.
This page refers to a folder/sub-folder/css files that don't exist. This page refers to a ui.theme.css file that doesn't exist.
我收到的下载内容包括:
The downloads I received included the following:
--development-bundle
---demos
----docs
----external
----themes
------base
------Redmond
----ui
------i8n
------minified
--js
那你放在哪里呢?我已经将js复制到适当的目录,并将其链接到我的页面中.然后,我也复制了theme/base文件夹,并链接到jquery.ui.all.css文件中.甚至随附的演示也仅显示默认(灰色)样式.
So what do you put where? I've copied the js to the appropriate directory and linked it into my page. And I copied the themes/base folder as well, and linked into the jquery.ui.all.css file. Even the included demos only display the default (grey) styling.
我要去哪里错了?
对不起,我实际上首先尝试过Redmond,但是当它不起作用时,我尝试了Smoothness(一种随机选择-没意识到它是灰色的).每种颜色我都得到相同的结果-灰色.[上面的文件夹结构也已更正]
Sorry, I actually tried Redmond first, but when it didn't work, I tried Smoothness (a random selection -didn't realise it was the grey one). I get the same results for each - grey.[also corrected folder structure above]
好吧,我已经弄清楚了....最初的Smoothness或Redmond下载都没有CSS文件夹(从我上面描述的结构中可以看出).这两个主题都在几分钟之内下载完成,并且文件大小不同.我刚刚尝试下载的确有一个CSS文件夹的Cupertino,将其复制到我的应用中后,我会得到适当的样式.
EDIT 2:Well, I've figured it out.... neither of the initial Smoothness or Redmond downloads had a CSS folder (as could be seen from the structure I described above). Both of these themes were downloaded within minutes of each other and have different file sizes).I've just tried downloading Cupertino, which does have a CSS folder - when I copy this to my app, I get appropriate styling.
所以我尝试再次下载Redmond,瞧瞧-它现在也有一个CSS文件夹...我想知道我是否可能两次下载了相同的主题,但是它们具有不同的时间戳和不同的文件大小……我很困惑.也许jQuery服务器只是有脑筋!
So I tried downloading Redmond again, and lo and behold - it also now has a CSS folder...I wondered if I might have downloaded the same theme twice, but they have different timestamps and different file sizes... I'm puzzled. Perhaps the jQuery server was just having a brain-fart!
今天,金牌明星尼克因将我带到jquery-ui-1.8.custom.css的踪迹中,最终导致了我的顿悟!
Todays gold star goes to nick for putting me onto the trail of jquery-ui-1.8.custom.css, which eventually led to my epiphany!
我刚刚开始下载开始和人性化-这两个zip文件都没有CSS文件夹!
I've just started downloading Start and Humanity - both zip files DO NOT have a CSS folder!
进一步研究,似乎我终究不会发疯. /strong>
Digging further, it seems I might not be crazy after all.
推荐答案
您需要先更改此链接,其格式应为:
You need to change this link in your head, it should be in this format:
<link rel="Stylesheet" href="/css/MY_THEME_HERE/jquery-ui-1.8.custom.css" />
例如,如果下载的redmond主题为:
For example, if you downloaded the redmond theme would be:
<link rel="Stylesheet" href="/css/redmond/jquery-ui-1.8.custom.css" />
下载时选择的任何主题都应包含在此路径的zip中.如果您构建了一个自定义主题,它将是:
Whatever theme you chose when downloaded should be included in the zip at this path. If you built a custom theme, it will be:
<link rel="Stylesheet" href="/css/custom-theme/jquery-ui-1.8.custom.css" />
这篇关于jQuery UI ThemeRoller-安装主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!