jQuery UI ThemeRoller - 安装主题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2564317/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jQuery UI ThemeRoller - Installing themes
提问by CJM
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.
我第一次尝试使用 ThemeRoller 主题安装 jQuery UI。我已经下载了 jquery 1.4.2 ... 我已经下载了几个主题的 jQuery UI。我试图按照说明进行操作,但它们似乎相互矛盾,并且似乎与下载的文件无关。
When I try to use a datepicker... the datepicker functionality works, but it has the default (grey) style.
当我尝试使用日期选择器时……日期选择器功能有效,但它具有默认(灰色)样式。
This pagerefers to a folder/sub-folder/css files that don't exist. This page refers to a ui.theme.css file that doesn't exist.
此页面引用了不存在的文件夹/子文件夹/css 文件。此页面引用了一个不存在的 ui.theme.css 文件。
The downloads I received included the following:
我收到的下载包括以下内容:
--development-bundle
---demos
----docs
----external
----themes
------base
------Redmond
----ui
------i8n
------minified
--js
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.
那你把什么放在哪里?我已将 js 复制到适当的目录并将其链接到我的页面。我也复制了 themes/base 文件夹,并链接到 jquery.ui.all.css 文件中。即使包含的演示也只显示默认(灰色)样式。
Where am I going wrong?
我哪里错了?
EDIT:
编辑:
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]
抱歉,我实际上首先尝试了 Redmond,但是当它不起作用时,我尝试了 Smoothness(随机选择 - 没有意识到它是灰色的)。我得到相同的结果 - 灰色。[也更正了上面的文件夹结构]
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.
编辑 2:嗯,我已经弄清楚了......最初的 Smoothness 或 Redmond 下载都没有 CSS 文件夹(从我上面描述的结构中可以看出)。这两个主题都是在几分钟内下载的,并且具有不同的文件大小)。我刚刚尝试下载 Cupertino,它有一个 CSS 文件夹 - 当我将它复制到我的应用程序时,我得到了适当的样式。
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!
所以我再次尝试下载 Redmond,瞧——它现在也有一个 CSS 文件夹......我想知道我是否可能已经下载了两次相同的主题,但它们有不同的时间戳和不同的文件大小......我很困惑. 也许 jQuery 服务器只是在放屁!
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!
今天的金星感谢尼克让我走上了 jquery-ui-1.8.custom.css 的道路,这最终导致了我的顿悟!
EDIT 3:
编辑 3:
I've just started downloading Start and Humanity - both zip files DO NOT have a CSS folder!
我刚刚开始下载 Start 和 Humanity - 两个 zip 文件都没有 CSS 文件夹!
Digging further, it seems I might not be crazy after all.
再进一步挖掘,看来我终究不是疯了。
采纳答案by Nick Craver
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" />
For example, if you downloaded the redmond theme would be:
例如,如果您下载 redmond 主题将是:
<link rel="Stylesheet" href="/css/redmond/jquery-ui-1.8.custom.css" />
Whatever theme you chose when downloaded should be included in the zip at this path. If you built a custom theme, it will be:
下载时选择的任何主题都应包含在此路径的 zip 中。如果您构建了自定义主题,它将是:
<link rel="Stylesheet" href="/css/custom-theme/jquery-ui-1.8.custom.css" />
回答by Justin Ethier
Smoothness is a grey theme - are you sure that it is not setup correctly? Maybe try one of the more colorful themes and see if it matches up with themeroller.
平滑度是一个灰色主题 - 您确定它没有正确设置吗?也许尝试一个更丰富多彩的主题,看看它是否与 themeroller 匹配。
回答by Ben
Smoothness is the "default" gery theme you get when you download jquery ui. When you roll your own theme then the css directory should have a "custom" directory which has your rolled theme.
平滑度是您下载 jquery ui 时获得的“默认”gery 主题。当您滚动自己的主题时,css 目录应该有一个“自定义”目录,其中包含您滚动的主题。
Are you sure you didn't selected the smoothness teheme while downloading jqueryUI instead of custom or another theme?
您确定在下载 jqueryUI 而不是自定义或其他主题时没有选择平滑度主题吗?
Sometimes, when you change a theme you need to actually reload the page (f5) to see the changes.
有时,当您更改主题时,您需要实际重新加载页面 (f5) 以查看更改。