开发者

With jquery dialog boxes how do you apply a theme?

开发者 https://www.devze.com 2022-12-24 10:13 出处:网络
Example: http://jqueryui.com/demos/dialog/#modal-confirma开发者_JAVA技巧tion The example shown allows you to view the source and even has a theme selector at the top right. But how do you apply a the

Example: http://jqueryui.com/demos/dialog/#modal-confirma开发者_JAVA技巧tion

The example shown allows you to view the source and even has a theme selector at the top right. But how do you apply a theme to your own code?


You need to include the CSS files that were part of the theme. For instance I want to theme the jQuery dialog with the ui-darkness theme:

<link type="text/css" rel="stylesheet" href="jQuery-theme-ui-darkness/jquery-ui.css" %>" />
<link type="text/css" rel="stylesheet" href="jQuery-theme-ui-darkness/ui.dialog.css" %>" />


Check out the "Theming" tab on that linked page. The plugin defines several classes for you. You just need to apply CSS to those classes.


The theming framework is just a series of CSS classes that are consistently used for the most part.

To use in your own code, just apply the classes to the right elements, and they'll be themed via CSS. To get started, here's a list of those classes and what they're used for.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号