我可以使用if语句为css吗?如果其他人为css
这就是我想要的文本的颜色改变:
<?php echo $status; ?>
将有2状态:待&交付 等待将是红色和交付将是绿色的
我可以像做(对CSS):
.pending {text-decoration:underline; color:red;}
.delivered {text-decoration:underline; color:green;}
如果else语句:
if ($status==delivered)
{
//this is where i don't know what to do and code
}
else
{
//and here
}
我应该放什么?或者其他解决方案?
如果您发现任何答案有帮助,请接受它,然后单击乐谱下方的勾号图标。 –