html - Unicode 图标 : sometimes looks like a wrong encoding

标签 html css google-chrome unicode google-chrome-extension

在我的 CSS 中我有这个(省略了不相关的代码):

.selector:after {
    content: '▾';
}

通常它看起来像这样:

unicode icon ▾

有时我打开my browser extension并查看此 â–¾:

unicode icon broken encoding ▾

在 devtools 中我看到了相同的内容:

devtools encoding â–¾

为什么会这样?我该如何解决?

最佳答案

https://www.w3.org/International/questions/qa-css-charset

如果是单独的样式表资源,在响应体中添加@charset "UTF-8";Content-Type: text/css; charset=UTF-8 到响应头。

关于html - Unicode 图标 : sometimes looks like a wrong encoding,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55760740/

相关文章:

html - 如果 div 是固定的,则内容超出容器的限制

css - Bootstrap 4 CSS 导致 Chrome 的打印 "Layout"消失

html - 已保存密码的 Chrome 问题 - 连续表单提交重试

html - 将按钮移至下一行和中心位置。保持背景图像为全尺寸

html - 是否有 div 到表格转换器?

HTML 元描述 + &

html - 我应该在我的 HTML5 视频源标签中为 MP4 指定什么编解码器?

html - 替代图像属性高度 :auto

javascript - 通过 javascript 加载 jQuery 时 $ 未定义

html - 使用 Flex Box 使一些盒子垂直和水平