css - 伪元素 :after not working in IE9 with content :"Γû╝"

标签 css

大家好,我添加了content: "▼"在 CSS3 中 :after伪元素,它在 IE9 中不能正常工作。

显示"Γû╝"像这个符号。我添加了 <meta>正确标记。

我的CSS

#get-in {
  position: relative;
  margin-top: 15px;
  margin-right: 0px;
  background-color: #bfbfbf;
  border-radius: 4px;
  border: 1px solid #b7b7b7;
  width: 74px;
  line-height: 26px;
  height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-indent: 15px;
  /*text-align: center;*/
}
#get-in:after {
  content: "▼";
  font-size: 12px;
  padding: 0 6px;
  position: absolute;
  right: 0;
  top: 0;
}

是我的代码有问题还是 IE9 不支持..?有什么解决办法吗?

最佳答案

CSS 文件的字符编码没有正确声明。首先,确保它实际上是 UTF-8 编码的并且在 HTTP header 中声明为 UTF-8 编码。您还可以将 @charset "utf-8" 放在 CSS 文件的开头。

关于css - 伪元素 :after not working in IE9 with content :"Γû╝",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18895141/

相关文章:

css - 如何使用 CSS 在点击时显示/隐藏内容

css - 跨浏览器的 Primefaces 复选框一致性

javascript - 在 Javascript 中获取 Bootstrap 当前的主题颜色

html - 这些列表中的样式有什么问题 (HTML)

html flex : border around item without expand in height

jquery - CSS、JQuery - Flex 元素在显示后不出现 : none;

javascript - 在D3 Javascript中单击节点时如何显示和隐藏链接和节点

html - Bootstrap Bootsnipp 片段无法正确呈现

html - CSS 背景颜色 : none;

html - 制作一行具有方形彩色背景的文本元素