缩略图调用举例[自动裁图]
所属分类: 模板标签 发布时间:2015-12-08 17:42 181浏览
当不指定background值的时候,会做自动裁减处理,默认裁减位置是以图中心为基点,裁减左右和上下相对多出来的图片部分。
{@data table='%s_content' field='title,image' where='status=1' number='5'} {#foreach($data as $rs)} 不指定position,切除四周:<img src="{DIR}{$rs[image] width='200' height='150'}" alt="{$rs[title] code='quote'}"/> 切除下面:<img src="{DIR}{$rs[image] width='200' height='150' position='top'}" alt="{$rs[title] code='quote'}"/> {#endforeach}