gpt4 book ai didi

jQuery Mobile ListView 缩略图图像对齐

转载 作者:太空宇宙 更新时间:2023-11-04 15:26:43 24 4
gpt4 key购买 nike

您好,我添加了一个带有缩略图的 ListView

使用

<ul data-role="listview" data-inset="false" data-theme="a" data-dividertheme="d">
<li><a href="image.php?imgid=2">
<img src="../images/comma.png" class="ui-li-thumb" />
<h3 class="ui-li-heading">Colleeeeeeeeeeeeege</h3>
<p class="ui-li-desc">by Scott Hill</p></a></li>
</ul>

并获取图像,但它不在中心如何使其适合缩略图区域

看这里的图片

enter image description here

非常感谢帮助

最佳答案

我遇到了同样的问题。我添加了以下事件来设置所需的顶部填充。

$("img[class='ui-li-thumb']").load(function() {
$(this).css('padding-top',((80-this.height)/2));
});

关于jQuery Mobile ListView 缩略图图像对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13927624/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com