我可以重用jQuery UI中的CSS文件吗?

时间:2021-06-10 08:21:44

Yesterday I used jQuery UI for the first time and I think I'm going to switch from Dojo to jQuery UI.

昨天我第一次使用jQuery UI,我想我要从Dojo切换到jQuery UI。

I noticed that jQuery UI comes with a set of CSS themes.

我注意到jQuery UI带有一组CSS主题。

  • Can I use them in my pages for non-jQuery related stuff?
  • 我可以在我的页面中使用它们来获取非jQuery相关的东西吗?

  • Are the CSS class names subject to frequent changes?
  • CSS类名是否经常发生变化?

  • Are there any other things and/or best practices I should be aware of?
  • 我应该注意其他任何事情和/或最佳实践吗?

2 个解决方案

#1


  1. Yes, you can use them wherever you feel like, just specify the classes you're interested in using.

    是的,你可以在任何你想要的地方使用它们,只需指定你感兴趣的类。

  2. JQueryUI doesn't make a habit of changing its class names, so that shouldn't be much of a concern.

    JQueryUI没有习惯改变它的类名,所以这不应该是一个问题。

  3. Not much more to say except to make sure JQueryUI already handles a particular styling you're looking for before you go to code your own.

    除了确保JQueryUI在您编写自己的代码之前已经处理了您正在寻找的特定样式之外,没有什么可说的了。

#2


Can I use them in my pages for non-jQuery related stuff?

我可以在我的页面中使用它们来获取非jQuery相关的东西吗?

Yes you can. They are just CSS / images that follow particular naming conventions.

是的你可以。它们只是遵循特定命名约定的CSS /图像。

Are the CSS class names subject to frequent changes?

CSS类名是否经常发生变化?

Probably not. I don't see the UI team changing them in any big way without prior announcement of the changes and reasons for the changes.

可能不是。我没有看到UI团队在未事先公布更改和更改原因的情况下以任何大的方式更改它们。

Are there any other things and/or best practices I should be aware of?

我应该注意其他任何事情和/或最佳实践吗?

Have a look at themeroller if you haven't already - it's the easiest way to build themes for your UI components.

如果你还没有看过themeroller,那么这是为你的UI组件构建主题的最简单方法。

#1


  1. Yes, you can use them wherever you feel like, just specify the classes you're interested in using.

    是的,你可以在任何你想要的地方使用它们,只需指定你感兴趣的类。

  2. JQueryUI doesn't make a habit of changing its class names, so that shouldn't be much of a concern.

    JQueryUI没有习惯改变它的类名,所以这不应该是一个问题。

  3. Not much more to say except to make sure JQueryUI already handles a particular styling you're looking for before you go to code your own.

    除了确保JQueryUI在您编写自己的代码之前已经处理了您正在寻找的特定样式之外,没有什么可说的了。

#2


Can I use them in my pages for non-jQuery related stuff?

我可以在我的页面中使用它们来获取非jQuery相关的东西吗?

Yes you can. They are just CSS / images that follow particular naming conventions.

是的你可以。它们只是遵循特定命名约定的CSS /图像。

Are the CSS class names subject to frequent changes?

CSS类名是否经常发生变化?

Probably not. I don't see the UI team changing them in any big way without prior announcement of the changes and reasons for the changes.

可能不是。我没有看到UI团队在未事先公布更改和更改原因的情况下以任何大的方式更改它们。

Are there any other things and/or best practices I should be aware of?

我应该注意其他任何事情和/或最佳实践吗?

Have a look at themeroller if you haven't already - it's the easiest way to build themes for your UI components.

如果你还没有看过themeroller,那么这是为你的UI组件构建主题的最简单方法。