CSS'内容'属性不尊重Windows上的Chrome颜色,在Mozilla中工作正常

时间:2017-05-17 16:07:52

标签: css windows google-chrome cross-browser

enter image description here     

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
    <style>
      .category::before{
        content: "◼";
        margin-right: 0.5em;
      }
    </style>
  </head>

  <body>
    <div class="category" style="color:red;">Category One</div>
  </body>

</html>

Plunkr链接:https://plnkr.co/edit/FUzEmrbN23ow6gyMAHCf?p=preview 内容属性在浏览器中的表现不一致。

0 个答案:

没有答案