gpt4 book ai didi

html - 将 unicode 形式的字符添加到 HTML/CSS 的语法是什么?

转载 作者:太空宇宙 更新时间:2023-11-04 03:30:27 25 4
gpt4 key购买 nike

我知道可以使用 unicode 添加符号;我以前看过它,但不记得怎么做了。我需要使列表项成为此列表中的 raquo 字符 http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references .它的 unicode 点是 U+00BB (187)

这是一个简单的 fiddle ,它给出了我的问题的场景:http://jsfiddle.net/3wh6997q/

HTML:

<ul>
<li>
<a> Item 1</a>
</li>
<li>
<a> Item 2</a>
</li>
<li>
<a> Item 3</a>
</li>
</ul>

CSS:

ul
{
list-style: none;
}

ul > li > a:before
{
content: ">>"; /* Actually I want the content to be the raquo character */
}

最佳答案

ul > li > a:before
{
content: "\00BB";
}

您需要十六进制值。

这里有一个资源列表:http://www.ascii.cl/htmlcodes.htm

关于html - 将 unicode 形式的字符添加到 HTML/CSS 的语法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26408787/

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