如何定制化SAP Spartacus的购物车图标
2021-02-22 本文已影响0人
华山令狐冲
SAP Spartacus默认的购物车图标如下图所示:

使用如下的css代码对其外观进行修改:
/* You can add global styles to this file, and also import other style files */
$skipComponentStyles: (cx-mini-cart);
@import "~@spartacus/styles/index";
@import "custom-styles";
cx-mini-cart {
margin-right: unset;
padding: 10px;
position: relative;
.count {
position: absolute;
border-radius: 50%;
color: white;
text-align: center;
right: 0;
top: 0;
}
.total {
display: none;
}
}
结果:

更多Jerry的原创文章,尽在:"汪子熙":
