欢迎您光临自学哈网,只为分享网络知识教程,供大家学习参考!

「自学哈网」帝国CMS灵动标签同时间信息颜色相同(不同时间文章信息不同颜色)

作者 : 自学哈 本文共959个字,预计阅读时间需要3分钟 2022-11-26 共111人阅读
也想出现在这里? 联系我们

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

灵动标签代码:

[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个日期时间

本站声明:
本站所有资源来源于网络,分享目的仅供大家学习和交流!如若本站内容侵犯了原著者的合法权益,可联系邮箱976157886@qq.com进行删除。
自学哈专注于免费提供最新的分享知识、网络教程、网络技术的资源分享平台,好资源不私藏,大家一起分享!

自学哈网 » 「自学哈网」帝国CMS灵动标签同时间信息颜色相同(不同时间文章信息不同颜色)
也想出现在这里? 联系我们
© 2022 Theme by - 自学哈网 & WordPress Theme. All rights reserved 浙ICP备2022016594号