IE 11 或 Google Chrome 的主要 Less 代码更改

Main Less Code Change for IE 11 or Google Chrome

我使用主要的 less 编译器来创建我的 css 文件。对于我的徽章,我使用例如Google Chrome 的代码:

.badge-default{
  position: relative;
  left: 18px;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #FFF;
}

现在我也想在 IE11 中使用我这边,但据我所知 -webkit-background-clip 和 -webkit-text-fill-color: transparent;与 IE11 不兼容。如何更改我的 less 代码以使用浏览器实际支持的特定 class .badge-default?

非常感谢您的回答。

问候

如果您在其他浏览器上遇到问题,我推荐这篇文章:http://nimbupani.com/using-background-clip-for-text-with-css-fallback.html

CSS 技巧有一个使用 modernizr 的后备方法:https://css-tricks.com/image-under-text/