让我们说我有一个包含通知消息的div
<div class="notification"></div>
Run Code Online (Sandbox Code Playgroud)
消息是通过PHP动态生成的
<div class="notification><?php echo $notif;?></div>
Run Code Online (Sandbox Code Playgroud)
但我希望那个div说它持有通知
Notification: [notification message]
Run Code Online (Sandbox Code Playgroud)
所以我输入了css:
.notification:before{
    content:'Notification: ';
}
Run Code Online (Sandbox Code Playgroud)
问题是我可以为该div添加另一个内容.例如,我想在通知之前出现警告图片:
所以可以把另一个和之前
.notification:before{
     content:url(warning.png);
}
Run Code Online (Sandbox Code Playgroud)
如果我喜欢那最后一个来了.那么如何展示它们呢?