伪元素:
::before
和 ::after
是 CSS 伪元素,它们允许我们在元素的内容之前(::before
)或之后(::after
)插入额外的内容。
需要设置 content
属性来指定要插入的内容。这个属性可以接受文本、图像、计数器、空白字符等。
mat-list-item::before {
content: "•";
margin-right: 8px;
}
伪类
:hover
是 CSS 伪类(class),它用于指定当用户鼠标悬停在元素上时应用的样式。
like 鼠标hover上这个class去的 手指效果
.custom-list:hover {
cursor: pointer;
}