您现在的位置是:网站首页 > 脚本编程>

dedecms 实现每5条信息添加一条分割线

2013-10-224913人围观
简介 dedecms 实现每5条信息添加一条分割线:代码如下

效果图:


<DIV class=articleList>
<DIV class=bd>
<UL>
{dede:list row='20' pagesize='20' titlelen='60'}
<li><SPAN>[field:pubdate runphp='yes'] 
$a="<font color=red>".strftime('%m-%d',@me)."</font>";
$b=strftime('%m-%d',@me);
$ntime = time(); 
$day3 = 3600 * 24;
if(($ntime - @me) < $day3) @me = $a;
else @me =$b; 
[/field:pubdate]</SPAN><a href='[field:arcurl/]'>[field:title/]</a></li>
[field:global name=autoindex runphp="yes"]
if(@me%5==0)@me=" <LI class=li-space>";
else @me="";
[/field:global]
{/dede:list}
  <LI class=li-space></LI></UL>
 <div class="dede_pages">
<ul class="pagelist">
             {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}
</ul>
</div><!-- /pages --> </DIV></DIV>

CSS样式:

.articleList {

    border-color: #FDDF8D;

    border-style: solid;
    border-width: 0 1px 1px;
}
.articleList .bd UL {
    margin: 0 auto;
    padding-top: 24px;

    width: 672px;

}
.articleList .bd UL LI {
    background: url("images/li03.png") no-repeat scroll left 50% rgba(0, 0, 0, 0);
    padding-left: 14px;
}
.articleList .bd UL LI A {
    color: #333333;
}
.articleList .bd UL LI A:hover {
   color: #CC0000;
}
.articleList .bd UL LI SPAN {
    color: #999999;
    float: right;
}
.articleList .bd UL LI.li-space {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border-bottom: 1px dashed #CCCCCC;
    clear: both;
    height: 14px;
    line-height: 14px;
    margin-bottom: 14px;
    padding: 0;
    width: 100%;

.articleList .bd .page {

    height: 50px;

    padding-top: 40px;
}

打赏本站,你说多少就多少

本文地址:https://www.qi522.com/view/19.html

来     源:千奇博客

精彩评论

微信关注

Copyright © 2013-2019 千奇博客 保留所有权利 辽ICP备13008238号