html - 更改在 css 中导入的 svg 的背景
问题描述
我有一堂课如下
.Collapsible__trigger {
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 400;
text-decoration: none;
position: relative;
border: 1px solid white;
padding: 10px;
color: #333;
&:after {
content: '';
background-image:url('/icons/plus.svg');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
display: inline-block;
width: 10px;
height: 10px;
transition: transform 300ms;
}
我在 psudo 之后通过 background-img 导入了一个 svg。我如何更改 svg 的颜色,因为填充属性不起作用。
解决方案
推荐阅读
- perl - 设置 perl 导出的常量
- angular - StoryBook 和 Angular 配置
- svg - 在单个父容器中缩放多个动态加载的 SVG 图像 -Angular7
- python - LogisticRegression predict_probe 返回奇怪的概率
- php - 损坏的下载 Zip 文件
- spring-cloud-gateway - Spring cloud gateway - 响应正文日志记录导致直接内存错误
- javascript - 未捕获的类型错误:无法读取 HTMLInputElement 处未定义的属性“值”。
- linux-device-driver - 如何 - 平台/miscdevice 的设备树节点
- yaml - 在应用程序 yaml 属性中保留领先空间
- angular - ng 意外关闭并给出错误 127。为什么会发生这种情况?