gpt4 book ai didi

html - 如何在 CSS 中包含 HTML 编码的 "content:"字符?

转载 作者:太空狗 更新时间:2023-10-29 14:10:12 26 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Adding HTML entities using CSS content

我有以下设置

CSS:

.header:before {
content: "&laquo;";
}

.header:after {
content: "&raquo;";
}

HTML:

<h3 class="header">Hello, this is some text which should be wrapped.</h3>

我只是希望将 header 中写入的内容包装在 « («) 和 » (») 中。我怎样才能使它在 CSS 中工作?它目前显示为:

&laquo; Hello, this is some text which should be wrapped. &raquo;

而不是:

« Hello, this is some text which should be wrapped. »

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com