CSS BEM 规范
1. 什么时候用 BEM 格式?
.hide {
display: none !important;
}2. 命名模式
.header {
&__body {
padding: 20px;
}
&__button {
&--primary {
background: #329FD9;
}
&--default {
background: none;
}
}
}2.1 Block 块
2.2 Element 元素
2.3 Modifier修饰符
最后更新于