css - SVG 应该使用自己的颜色,不管 css 填充:currentColor
问题描述
我的问题是这样的:
.icon {
color: red;
> svg {
fill: currentColor;
path,
use {
fill: currentColor;
}
}
}
现在我需要再次用 css/sass 覆盖上面的代码,并告诉 svg 它应该使用他自己的填充值:
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" **fill="#e1306c"**>
我无法解决这个问题 - 请帮忙!
解决方案
推荐阅读
- swift - replaceOccurrences 在 Playground 中工作,在编译的 macOS 应用程序中失败
- postgresql - 使用大/长子查询的 PostgreSQL 删除语句挂起/失败
- python - 在 PyQt 中使用 while-loop 时 time.sleep() 使程序崩溃
- java - 添加到arraylist列表
- jquery - 如何使用带有参数的jquery重定向到另一个页面
- matlab - Octave GUI 中的变量编辑器是什么
- opencl - clCreateContext 中的 `property` 参数的含义和目的是什么
- sql - Oracle 查询从第 1 列返回第 2 列中某些值的值
- asp.net-web-api2 - 将 Swagger (swashbuckle v5.3.1) 与 Asp.net Core 3.1.1 一起使用时,Bearer Token 中缺少 Audience 参数
- python - Python:如何使类方法与父类的实例方法通信