CSS 将 html 实体作为内容

Pro*_*ogo 5 html css html-encode html-entities html-escape-characters

使用 csscontent属性,我试图在元素之后放置一个 HTML 实体。

这是我的 HTML

<table id="tic" cellpadding="0" cellspacing="0" border="5" bordercolor="black" bordercolorlight="gray" bgcolor="white">
    <tr>
        <td width="55" height="55" class="x"></td>
        <td width="55" height="55" class="o"></td>
        <td width="55" height="55" class="x"></td>
    </tr>
    <tr>
        <td width="55" height="55" class="o"></td>
        <td width="55" height="55" class="x"></td>
        <td width="55" height="55" class="o"></td>
    </tr>
    <tr>
        <td width="55" height="55" class="x"></td>
        <td width="55" height="55" class="o"></td>
        <td width="55" height="55" class="x"></td>
    </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

还有我的 CSS

table{
    text-align:center;
    font-size:2em;
    font-weight:bold;
}
td.o:after{
    content:"&#9675;";
    font-weight:bold;
}
td.x:after{
    content:"&#x2716;"
}
Run Code Online (Sandbox Code Playgroud)

不幸的是,而不是得到 ? 性格和?字符,我得到实体名称。

小提琴

我该如何解决这个问题?谢谢!

Que*_*tin 4

CSS 不是 HTML。您不能在其中使用 HTML 实体。

\n\n

使用文字字符 ( \xe2\x9c\x96) 或 CSS unicode 转义

\n