gpt4 book ai didi

html - '»' 和 '✔' 之类的字符不会出现在 Firefox 中

转载 作者:行者123 更新时间:2023-11-28 09:55:42 24 4
gpt4 key购买 nike

在设计网页时,我发现像“✔”这样的字符在 Firefox 中完全不能出现,而在 Chrome 中却可以。

对应于类型为“check”的输入的示例 CSS 代码:

#todo-list li .toggle:after {
content: '✔';
/* 40 + a couple of pixels visual adjustment */
line-height: 43px;
font-size: 20px;
color: #d9d9d9;
text-shadow: 0 -1px 0 #bfbfbf;
}

它在 Chrome 中完美运行。抱歉,我没有足够的学分来张贴图片。但是在 Firefox 中,这个字符并没有出现,而是显示为一个常规的复选框。我已经在 html 文件中将我的字符集设置为“utf-8”。

最佳答案

You will never make fonts look exactly the same in all browsers, whether the characters in question are Dingbats or not.

也就是说,并非所有浏览器都具有相同的字体系列,这种特定的字符样式称为 Dingbat不会对所有浏览器都一样。但是您也许可以通过更改字体系列来避免这种情况,例如。 font-family: Meiryo,您可能知道这不适用于与您没有相同字体系列的用户。

更多信息,请阅读this.

关于html - '»' 和 '✔' 之类的字符不会出现在 Firefox 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24926871/

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