0
p:before { content:"\00a1"; }

但这是倒置的感叹号。我只需要正常的感叹号。有什么想法吗?

4

4 回答 4

7

如果您想要标准字符,则不需要 unicode 代码:

p:before { content:"!"; }
于 2013-08-24T09:52:45.843 回答
1
Below classes are the Exclamation Mark with round red background

.dot {
    height: 25px;
    width: 25px;
    background-color: red;
    border-radius: 50%;
    display: inline-block;
}
.dot:before {
    content:'\0021';
}
于 2018-11-25T19:00:26.540 回答
0

\00a1 是反感叹号的 unicode,只需使用 content: '!'; 因为 !不是真正的“特殊”

于 2017-08-02T23:47:29.147 回答
0

\0021是“正常”感叹号的 unicode。您的代码将如下所示:

p:before { content:"\0021"; }

于 2017-08-12T04:47:49.690 回答