如何创建 jQuery Mobile 主题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5328001/
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
How to create a jQuery Mobile theme
提问by Diogo Cardoso
How do I create a jQueryMobile theme?
如何创建 jQueryMobile 主题?
Is it overriding the CSS the best way?
它是覆盖 CSS 的最佳方式吗?
回答by Blowsie
The best method for creating a theme is actually modifying the existing one. Just like Jquery Mobile have done with their "Valenica" Theme. Use the standard css as a starting point / reference
创建主题的最佳方法实际上是修改现有主题。就像 Jquery Mobile 用他们的“Valenica”主题所做的一样。使用标准 css 作为起点/参考
http://code.jquery.com/mobile/latest/jquery.mobile.css
http://code.jquery.com/mobile/latest/jquery.mobile.css
Often the best way to work out which elements need the styling tweaks is to inspect them via Firebug
通常,确定哪些元素需要样式调整的最佳方法是通过 Firebug 检查它们
Its also worth noting, its not a great idea to try and create a theme from scratch, as a large part of what makes jquery mobile so great is the cross browser testing and developments they have already made to the css.
还值得注意的是,尝试从头开始创建主题并不是一个好主意,因为使 jquery mobile 如此出色的很大一部分原因是他们已经对 css 进行了跨浏览器测试和开发。
Update:
更新:
In the near future there will be a jquery mobile theme roller, you can track its development at github.
在不久的将来会有一个jquery移动主题滚轮,你可以在github上跟踪它的发展。
https://github.com/jquery/jquery-mobile
https://github.com/jquery/jquery-mobile
Update 2
更新 2
The theme roller is ready!
主题滚轮已准备就绪!
回答by Danny C
Just discovered a neat tool for creating prototypes which includes its own theme-maker/roller. Worth checking out! More for the themes than the prototyping. At least until the official themeroller comes out. http://www.mobjectify.com
刚刚发现了一个用于创建原型的简洁工具,其中包括自己的主题制作器/滚筒。值得一试!比原型设计更多的主题。至少在官方themeroller出来之前。 http://www.mobjectify.com
Allows you to easily add extra JqueryMobile themes and see it live.
允许您轻松添加额外的 JqueryMobile 主题并实时查看。
回答by Kris Hadlock
Here's an article I wrote for IBM with this exact title: Create custom jQuery mobile themes
这是我为 IBM 写的一篇文章,标题是:创建自定义 jQuery 移动主题
回答by Mottie
I haven't had a chance to test the results of this theme roller; but I thought it might be useful, at least until the official themeroller is available.
我还没有机会测试这个主题滚轮的结果;但我认为它可能有用,至少在官方主题滚轮可用之前。