Home > Article > CMS Tutorial > 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='yes']@me = (empty(@me['litpic']) ? "" : "<a <a href="mailto:href='{@me['arcurl']}'">href='{@me['arcurl']}'</a> class='preview'><img <a href="mailto:src='{@me['litpic']}'/></a">src='{@me['litpic']}'/></a</a>>"); [/field:array] ---这里控制的是缩略图----如果要控制图片的高度需要修改: <img <a href="mailto:src='{@me['litpic']}'">src='{@me['litpic']}'</a> 这里现在的是宽度: img <a href="mailto:src='{@me['litpic']}'">src='{@me['litpic']}'</a> iwidth='300' height='370' 这里控制了宽度的大小,以及高度 -------------------------------------- [<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}
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 样式
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; }
Method 2:
{dede:list pagesize='15' imgwidth='100' imgheight='70' infolen='180'}
Method 3:
Replace the label [field:imglink/] in the calling code with
<a href='[field:arcurl /]' target="_blank"><img src='[field:picname /]' border='0' width='' height=''></a>
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!