帝国CMS灵动标签同日信息颜色相同(不同时间文章信息不同颜色)

帝国教程 强烈建议 2024-03-04 08:38 88 0

  灵动标签代码:

  [e:loop={35,10,0,0,'','newstime DESC'}]

  $day=date('Ymd',$bqr[newstime]);

  if(!$n){

  $n=0;

  }

  if($bqno==1){

  $d=$day;

  $class='class=t'.$n.'';

  }else{

  if($d==$day){

  $class='class=t'.$n.'';

  }else{

  $n++;

  $class='class=t'.$n.'';

  $d=$day;

  }

  }

  ?> target=_blank >_______[]

  [/e:loop]

  注意:为class的css样式

  --------------------------------------------------------------------------------------

  css样式:

  .t0 {

  color: #DC143C;

  text-decoration: none;

  }

  .t1 {

  color: #FF1493;

  text-decoration: none;

  }

  .t2 {

  color: #0000FF;

  text-decoration: none;

  }

  .t3 {

  color: #008000;

  text-decoration: none;

  }

  .t4 {

  color: #FF4500;

  text-decoration: none;

  }

  .t5 {

  color: #00FF7F;

  text-decoration: none;

  }

  注意:可以加和多个,因为上面的6个(t0-t5)css颜色,剩下的将为默认的系统颜色

本站资源均来自互联网或会员发布,如果不小心侵犯了您的权益请与我们联系。我们将立即删除!谢谢!