您现在的位置是:首页 > 教程 > 帝国CMS教程帝国CMS教程
帝国CMS灵动标签同日信息颜色相同,不同时间文章信息不同颜色
莘菡2023-01-22 18:59:42帝国CMS教程已有人查阅
导读注意:可以加和多个,因为上面的6个(t0-t5)css颜色,剩下的将为默认的系统颜色,一般如果灵动标签调用10条信息就设置10个css颜色,既:10条信息对应10个日期时间
灵动标签代码:
[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;
}
}
?><a href="<?=$bqsr['titleurl']?>" target="_blank" <?=$class?>><?=$bqr['title']?>_______[<?=date('Ymd',$bqr[newstime])?>]</a> <br>
[/e:loop]
注意:<?=$class?>为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颜色,剩下的将为默认的系统颜色
一般如果灵动标签调用10条信息就设置10个css颜色,既:10条信息对应10个日期时间
本文标签:
很赞哦! ()
相关文章
随机图文
-
帝国CMS实现调用一周之内信息的功能
调用一周之内的信息,如果本周内某天没有发布信息,调用上周的信息: -
帝国cms7.5版本utf-8版php7.2增加栏目生成拼音乱码怎么办
修改e/class/connect.php文件,找到ReturnPinyinFun函数,改名为ReturnPinyinFun_BAK,将下列代码粘贴在下面: -
帝国CMS二次开发列表页怎么调用tags标签
帝国CMS灵动标签列表页调用20条tags标签教程,limit 20 显示20条tagid desc 按tagid排行 -
帝国CMS百度收录/e/extend/infocomment/commentajax.php?classid=xxxx&id=xxx
首先收录这个并不重要,他是AJAX提交评论入口链接,对整体优化没有干扰。所以不想麻烦的可以不看下面的步骤。
留言与评论 (共有 条评论) |