1. CSS code:
.newpage::after {
content: "新"; /* 显示的文字 */
display: inline-block;
color: #ff0000;
font-weight: bold;
font-size: 14px;
margin-left: 8px;
animation: gentleJump 1s ease-in-out infinite;
}
@keyframes gentleJump {
0% { transform: translateY(0); }
50% { transform: translateY(-3px); }
100% { transform: translateY(0); }
}
2.php code: determines and outputs the value of the `class` attribute.
<?php if (time() - intval($bqr['newstime']) <= 259200){echo 'newpage';}?>
3. Complete Dynamic Tag invocation code.
[e:loop={1,8,0,0}]
<li>
<a class="<?php if (time() - intval($bqr['newstime']) <= 259200){echo 'newpage';}?>" href="<?=$bqsr['titleurl']?>" title="$bqr['title']"><?=esub($bqr['title'],15,"...")?></a>
<span class="carousel-date"><?=date("Y-m-d",$bqr[newstime])?></span>
</li>
[/e:loop]
Display effect:
