我正在使用英特尔XDK中的列表视图模板在我的项目中我想在每个列表中使用图像的缩略图。有什么解决办法吗?因为我是HTML开发的新手

有帮助吗?

解决方案

您可以在 <li> 要创建的元素 <img> 元素。下面是使用图像缩略图+文本创建自定义列表的示例代码: 自定义列表视图

<style>
    #afui #listview .list li {padding:10px 20px 10px 10px}
    .list-image {float:left;width:50px;height:50px}
    .list-text {margin-left:60px;min-height:50px}        
</style>

海关规定 <li>:

    <ul class="list">
        <li>
            <a href="#item1">
                <img class="list-image" src="data/male_user_icon.svg" />
                <div class="list-text"><b>username1</b><br>Placeholder text for this list item 1.</div>
            </a>
        </li>
    </ul>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top