Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了这个简单的代码,它只是一个在单击时保持“推送”状态并在再次单击时恢复正常的按钮。
问题:通过使用 float:right 标签中的文本向右移动,如果我不设置浮动它默认向左移动。但是当我把 float:center 它留在左边。如果有人可以帮助我将文本放在中心,我会很高兴。谢谢你!
这是我来自 jsfiddle 的代码
你想要居中的 jQuery Mobile 元素是嵌套在你的字段集中的那个.ui-btn-text类:
.ui-btn-text
#ui-2 .ui-btn-text { text-align : center; width : 100%; }
http://jsfiddle.net/nfGmJ/10/