您好,
我更改了 ::before CSS 代码,将 background 设置为 none,并添加了 background-image: url (…)。但当我调整大小时,它不像我想要的那样工作。
例如 width: 60px 和 height: 60px 或 max-width: 60px。
我在哪里犯错了?
您好,
我更改了 ::before CSS 代码,将 background 设置为 none,并添加了 background-image: url (…)。但当我调整大小时,它不像我想要的那样工作。
例如 width: 60px 和 height: 60px 或 max-width: 60px。
我在哪里犯错了?
我做到了 ![]()
.badge-category__wrapper .badge-category:before {
background: none;
border-radius: 2px;
margin-top: 4px;
width: 15px;
height: 15px;
min-width: 15px;
min-height: 15px;
background-image: url(IMG URL);
background-size: 15px 15px;
margin-right: .5em;
}
.badge-category__wrapper .badge-category.--has-parent:before {
background: none;
border-radius: 2px;
margin-top: 4px;
width: 15px;
height: 15px;
min-width: 15px;
min-height: 15px;
background-image: url(IMG URL);
background-size: 15px 15px;
margin-right: .5em;
}