dedecms列表页缩略图大小控制的方法
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>dede列表页缩略图大小控制的方法,列表开始</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
</p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<div class="right">
<span><u>复制代码</u></span>
</div>
代码如下:</div>
<div class="msgborder" id="phpcode1" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
{dede:list pagesize='10'} ----调用的条数10条---<br>
<li> <br>
@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>>"); <br>
---这里控制的是缩略图----如果要控制<u>图片</u>的高度需要修改: <img <a href="mailto:src='{@me['litpic']}'">src='{@me['litpic']}'</a> 这里现在的是宽度:<br>
img <a href="mailto:src='{@me['litpic']}'">src='{@me['litpic']}'</a> iwidth='300' height='370' 这里控制了宽度的大小,以及高度<br>
--------------------------------------<br>
[<b></b>] ----这里控制的是栏目----<br>
<a href="" class="title"></a> ---这里控制的是标题,标题链接----<br>
<span class="info"> -----这里控制的是描述<br>
<small>日期:</small> <small>点击:</small> <small>好评:</small> </span><br>
<p class="intro"> ... </p> ----描述-----<br>
</li><br>
{/dede:list}</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
如果要控制图片的高度需要修改:</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<strong>方法1:</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
这个模板的图片大小控制是由CSS控制的<br>
要修改CSS<br>
右边图片区域修改<br>
templets/style/picture.css文件<br>
.pbox 样式<br>
如图片大小<br>
.pbox dl dt{<br>
width:188px;<br>
height:132px;<br>
display:block;<br>
overflow:hidden;<br>
}<br>
.pbox dl dt a img{<br>
display:block;<br>
width:expression(this.width > this.height && this.width >176 ? 176 : true);<br>
height:expression(this.height > this.width && this.height > 132? 132 : true);<br>
max-width:176px;<br>
max-height:132px;<br>
margin:0px auto 0px;<br>
}</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<strong>方法2:</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
{dede:list pagesize='15' imgwidth='100' imgheight='70' infolen='180'}</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<strong>方法3:</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
把调用代码中标签换成<br>
<a href='' target="_blank"><img src='' border='0' width='' height=''></a></p>
頁:
[1]