使用 jquery 对话框如何应用主题?
例子: http://jqueryui.com/demos/dialog/#modal-confirmation
显示的示例允许您查看源代码,甚至在右上角有一个主题选择器。但是如何将主题应用到您自己的代码中呢?
Example:
http://jqueryui.com/demos/dialog/#modal-confirmation
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要包含属于主题一部分的 CSS 文件。例如,我想使用 ui-darkness 主题来设置 jQuery 对话框的主题:
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:
查看该链接页面上的“主题”选项卡。该插件为您定义了几个类。您只需将 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.
主题框架只是一系列在大多数情况下一致使用的 CSS 类。
要在您自己的代码中使用,只需将类应用到正确的元素,它们将通过 CSS 进行主题化。首先,这里列出了这些类及其用途。
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.