zl程序教程

您现在的位置是:首页 >  其他

当前栏目

如何定制化SAP Spartacus的购物车图标

SAP 如何 Spartacus 图标 定制 购物车
2023-09-14 09:02:52 时间

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的原创文章,尽在:“汪子熙”: