联系电话:020-28187900

调用缩略图圆角效果的标签

发表时间:2012-10-24 阅读: 3433

K9的标签如何编写才能够使得调用出来的图片呈圆角效果的缩略图,而不是用CSS来实现的呢?

其实如果你看过前面写的《K9标签基础篇:缩略图》文章,便简单的多。

其中,padding画图像边缘线的取值有这么两条属性:

fillet:圆倒角边缘线

padding-r:当指定为圆角或斜倒角边缘线的时候的半径值

例子:调用图片内容的圆角效果调用标签

{@res.join table1='%s_content_isimage' table2='%s_content' field2='title,description,url,image' on='id' where='t2.status=1'order='t2.id desc' number='4'}
{#foreach($res as $rs)}
<img src="{DIR}{$rs[image] width='230' height='95' position='center' padding='fillet' padding-r='5'}" alt="{$rs[title] code='quote'}" />
{#endforeach}
以上的调用是没有阴影效果,如果想加上阴影效果(padding-filter:滤镜类型,shadow:阴影)的标签如下:

{@res.join table1='%s_content_isimage' table2='%s_content' field2='title,description,url,image' on='id' where='t2.status=1'order='t2.id desc' number='4'}
{#foreach($res as $rs)}
<img src="{DIR}{$rs[image] width='230' height='95' padding='fillet' padding-filter='shadow' padding-size='5'}" alt="{$rs[title] code='quote'}"/>
{#endforeach}

调用的效果图如下所示:

圆角效果

转载请注明出处:唯众网络


相关教程 【更多】

唯众网络