Home > CMS Tutorial > DEDECMS > How to control the thumbnail size of dedecms list page

How to control the thumbnail size of dedecms list page

藏色散人
Release: 2019-12-11 09:45:32
Original
2469 people have browsed it

How to control the thumbnail size of dedecms list page

How to control the thumbnail size of dedecms list page?

Sometimes when we make thumbnails, we need to consider the size of the thumbnails. Let’s share them briefly here for the convenience of friends who need them

Recommended learning: 梦Weaving cms

Dede list page thumbnail size control method, list start

The code is as follows:

{dede:list pagesize='10'} ----调用的条数10条---
<li> 
[field:array runphp=&#39;yes&#39;]@me = (empty(@me[&#39;litpic&#39;]) ? "" : "<a <a href="mailto:href=&#39;{@me[&#39;arcurl&#39;]}&#39;">href=&#39;{@me[&#39;arcurl&#39;]}&#39;</a> class=&#39;preview&#39;><img <a href="mailto:src=&#39;{@me[&#39;litpic&#39;]}&#39;/></a">src=&#39;{@me[&#39;litpic&#39;]}&#39;/></a</a>>"); 
[/field:array] ---这里控制的是缩略图----如果要控制图片的高度需要修改: <img <a href="mailto:src=&#39;{@me[&#39;litpic&#39;]}&#39;">src=&#39;{@me[&#39;litpic&#39;]}&#39;</a> 这里现在的是宽度:
img <a href="mailto:src=&#39;{@me[&#39;litpic&#39;]}&#39;">src=&#39;{@me[&#39;litpic&#39;]}&#39;</a> iwidth=&#39;300&#39; height=&#39;370&#39; 这里控制了宽度的大小,以及高度
--------------------------------------
[<b>[field:typelink/]</b>] ----这里控制的是栏目----
<a href="[field:arcurl/]" class="title">[field:title/]</a> ---这里控制的是标题,标题链接----
<span class="info"> -----这里控制的是描述
<small>日期:</small>[field:pubdate function="GetDateTimeMK(@me)"/] <small>点击:</small>[field:click/] <small>好评:</small>[field:scores/] </span>
<p class="intro"> [field:description/]... </p> ----描述-----
</li>
{/dede:list}
Copy after login

If you want to control the height of the picture Need to modify:

Method 1:

The image size control of this template is controlled by CSS

To modify the CSS

Modify the right image area

templets/style/picture.css文件
.pbox 样式
Copy after login

Such as picture size

.pbox dl dt{
width:188px;
height:132px;
display:block;
overflow:hidden;
}
.pbox dl dt a img{
display:block;
width:expression(this.width > this.height && this.width >176 ? 176 : true);
height:expression(this.height > this.width && this.height > 132? 132 : true);
max-width:176px;
max-height:132px;
margin:0px auto 0px;
}
Copy after login

Method 2:

{dede:list pagesize=&#39;15&#39; imgwidth=&#39;100&#39; imgheight=&#39;70&#39; infolen=&#39;180&#39;}
Copy after login

Method 3:

Replace the label [field:imglink/] in the calling code with

<a href=&#39;[field:arcurl /]&#39; target="_blank"><img src=&#39;[field:picname /]&#39; border=&#39;0&#39; width=&#39;&#39; height=&#39;&#39;></a>
Copy after login

The above is the detailed content of How to control the thumbnail size of dedecms list page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template