问题描述
我正在使用JQuery Mobile开发应用程序.我需要在标题栏中使用的按钮中使用自定义图像.我不确定如何使用自定义图像.我已经查看了以下文档: http://jquerymobile. com/demos/1.0.1/docs/toolbars/docs-headers.html .
I am working on an application with JQuery Mobile. I need to use a custom image in a button that is used in a header bar. I'm not sure how to use a custom image though. I've reviewed the documentation found here: http://jquerymobile.com/demos/1.0.1/docs/toolbars/docs-headers.html.
我的自定义图片位于"/imgs/header/custom.png".如何在JQuery Mobile应用程序标题的按钮中使用此图像?
My custom image is located at "/imgs/header/custom.png". How do I use this image in a button in the header of a JQuery Mobile application?
谢谢!
推荐答案
如果您要使用自定义图标,则可以执行以下操作:
If you mean that you want to use a custom icon then you can do this:
CSS-
.ui-icon-custom {
background-image: url(/imgs/header/custom.png) !important;
}
HTML-
<a data-icon="custom" href="#">Custom</a>
来源: http://jquerymobile.com /demos/1.0.1/docs/buttons/buttons-icons.html (页面底部)
Source: http://jquerymobile.com/demos/1.0.1/docs/buttons/buttons-icons.html (the bottom of the page)
这篇关于JQuery Mobile中的自定义标题按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!