首页 > 解决方案 > 如何在背景图像中添加来自 Angular Material 的图标?

问题描述

如何在 bacground-image 中添加来自 Angular Material 的 arrow_forward 图标(在 :after 中)?这个图标不需要下载。我不知道如何在css中获取它。

.item {
  position: relative;
  min-height: 100px;
  border: 1px solid #adb8c1;

  &:after {
    content: '';
    position: absolute;
    top: 50%;
    right: -25px;
    display: block;
    width: 10px;
    height: 10px;
    background: blue;
  }
}
<md-list class="list">
  <div class="item"></div>
</md-list>

标签: cssangularangular-materialicons

解决方案


我认为这会有所帮助

&:after {
font-family: "Material Icons"; 
content: "\E876";
position: absolute;
top: 50%;
right: -25px;
display: block;
width: 10px;
height: 10px;
background: blue;

}


推荐阅读