我有这个 html 代码:
<div data-role="footer" data-position="fixed">
<a id="info">About - Settings</a>
</div>
JqueryMobile 会将“a”样式设置为按钮,因为它位于页脚内:
这是框架添加的css:
<a id="page/idinfo" class="ui-link ui-btn ui-shadow ui-corner-all" data-role="button" role="button">About</a>
如何阻止该按钮的样式?
这就是我需要的:
我知道我可以尝试一些 javascript 来从 anchor 中删除该类,但也许 JQueryMobile 有一些东西可以防止这种样式。
提前致谢!
最佳答案
尝试添加 dara-role="none":
<div data-role="footer" data-position="fixed" >
<span data-role="none"> <a id="info">About - Settings</a></span>
</div>
在 jQM 1.4 中,data-role="none"似乎需要位于容器上,在 1.3 中,您可以将其直接应用于 anchor 标记。
关于jquery - 如何防止 JQueryMobile 中的页脚添加到 anchor 的样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20169238/