你好,我想在首页调用文章的缩略图和标题,但调出的图片很大溢出DIV范围了,貌似imgwidth,imgheight没作用
<divid="displayProducts"class="displayProducts"><ulid="wrapProducts">{dede:arclistrow...
<div id="displayProducts" class="displayProducts">
<ul id="wrapProducts">
{dede:arclist row='1' channelid='7' typeid='8' imgwidth='130' imgheight='130' type='image' infolen='120' orderby ='pubdate'}
<li>
<div class="colLeft">
<div class="imgBig">
<a href="[field:arcurl/]">
<img src="[field:picname/]" onerror="this.src='images/nopic.jpg'"/></a>
</div>
</div>
<div clasclass="colMain">
<h4> <a href="[field:arcurl/]" title="[field:title/]">[field:title/]</a></h4>
class="new">
[field:fulltitle/]
</div>
<p>
[field:info/]
<a class="more" href="[field:arcurl/]"><span>More</span></a>
</p>
</div>
</li>
{/dede:arclist}
</ul>
</div> 展开
<ul id="wrapProducts">
{dede:arclist row='1' channelid='7' typeid='8' imgwidth='130' imgheight='130' type='image' infolen='120' orderby ='pubdate'}
<li>
<div class="colLeft">
<div class="imgBig">
<a href="[field:arcurl/]">
<img src="[field:picname/]" onerror="this.src='images/nopic.jpg'"/></a>
</div>
</div>
<div clasclass="colMain">
<h4> <a href="[field:arcurl/]" title="[field:title/]">[field:title/]</a></h4>
class="new">
[field:fulltitle/]
</div>
<p>
[field:info/]
<a class="more" href="[field:arcurl/]"><span>More</span></a>
</p>
</div>
</li>
{/dede:arclist}
</ul>
</div> 展开
1个回答
展开全部
<div id="displayProducts" class="displayProducts">
<ul id="wrapProducts">
{dede:arclist row='1' channelid='7' typeid='8' imgwidth='130' imgheight='130' type='image' infolen='120' orderby ='pubdate'}
<li>
<div class="colLeft">
<div class="imgBig">
<a href="[field:arcurl/]">
<img src="[field:picname/]" onerror="this.src='images/nopic.jpg'" width="130"; height="130"/></a>
</div>
</div>
<div clasclass="colMain">
<h4> <a href="[field:arcurl/]" title="[field:title/]">[field:title/]</a></h4>
class="new">
[field:fulltitle/]
</div>
<p>
[field:info/]
<a class="more" href="[field:arcurl/]"><span>More</span></a>
</p>
</div>
</li>
{/dede:arclist}
</ul>
</div>
在图片img中加入width="130"; height="130"代码控制图片宽度和高度。
追问
在CSS中有加width="130"; height="130",没用。问题是调用的好像不是缩略图,而是文章内容中的大图。因为发布文章时没有专门上传缩略图,而是勾选自动截取第一张图做为缩略图。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询