如何创建一个 jquery mobile 有序列表,并将列表符号设置为外部?
<ol data-role="listview">
<li>
<h3>heading</h3>
<p>description</p>
</li>
</ol>
结果是:
1.
Heading
Description
我想要:
1. Heading
Description
我本以为我可以将 list-style-position:outside 作为带有 li 标签的内联样式。运气不好。如果我删除列表视图数据角色,则样式将正确应用。
一些listview日期角色是如何操纵样式的,但我不知道如何...我在jquery mobile css和js文件中搜索了list-style-position行,但没有返回结果,什么这是怎么回事?
请帮忙吗?
附言。使用jquery移动1.0a4.1
<ol data-role="listview">
<li>
<h3>heading</h3>
<p>description</p>
</li>
</ol>
The result is:
1.
Heading
Description
I want:
1. Heading
Description
I would have thought I could have stuck list-style-position:outside as an inline style with the li tag. No luck. If I remove the listview data-role, the style is applied correctly.
Some how the listview date-role is manipulating the styles, I can't figure out how though... I've searched for the list-style-position line in the jquery mobile css and js files and no results were returned, what is going on here?
Some help please?
PS. using jquery mobile 1.0a4.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来您需要添加一些自定义 CSS
Live 示例: http://jsfiddle.net/7Bn2z/43/
实例#2: http://jsfiddle.net/7Bn2z/48/ (修复了布局小)
HTML:
CSS:
更新:
如果您安装了 Chrome,您可以右键单击此处的示例页面: http:// jsfiddle.net/7Bn2z/49/ 并检查元素。正如您所看到的,jQM 添加了 CSS 的标签,
因此在示例中我们从以下内容开始:
jQM 将其标签添加到此:
Looks like you need to add some custom CSS
Live Example: http://jsfiddle.net/7Bn2z/43/
Live Example #2: http://jsfiddle.net/7Bn2z/48/ (Fixed the layout a little)
HTML:
CSS:
UPDATE:
If you have chrome installed you can right click the example page here: http://jsfiddle.net/7Bn2z/49/ and inspect element. As you can see jQM adds a to of CSS
So in the example we start off with:
And jQM adds it's tags to this:
在我的 jquery 移动应用程序中创建编号列表时,我遇到了同样的问题。下面的 CSS 解决了我的问题:
I had the same issue when creating a numbered list in my jquery mobile app. The css below fixed the problem for me: