如何将图标,图片放在Jquerymobile右侧的列表中

时间:2012-06-27 11:52:13

标签: html jquery-mobile

我正在使用jquerymobile,并尝试显示列表,图标或其他图片的默认位置是左侧!我该如何改变它?

<ul data-role="listview" data-theme="a">
            <li>
                <p><strong>text</strong></p>
                <p class="ui-li-aside"><img src="images/album-bb.jpg"/></p>
            </li>

1 个答案:

答案 0 :(得分:1)

这对你有用吗?

CSS(新课程)

.ui-li-icon-right {
    max-height: 40px;
    max-width: 40px;
    right: 10px;
    top: .9em;
}​

HTML(将新类应用于图像)

<ul data-role="listview" data-theme="a">
    <li>
         <h3>Title</h3>
        <p><strong>Albums</strong></p>
        <p class="ui-li-aside">
            <img src="http://a.vimeocdn.com/images_v6/icon_albums_md.png" class="ui-li-icon-right"/>
        </p>
    </li>
</ul>
<br />
<br />
<ul data-role="listview" data-theme="a">
    <li>
        <a>
            <h3>Title</h3>
            <p><strong>is this what you wanted?</strong></p>
            <p>Look Ma, more text</p>
            <p class="ui-li-aside">
                <img src="http://a.vimeocdn.com/images_v6/icon_albums_md.png" class="ui-li-icon-right"/>
            </p>
        </a>
    </li>
</ul>