css类名规范BEM用法

  1. 块__元素–修饰符
    page__button–primary
  2. 每个部分内部使用-连接
    page-header__button–primary
  3. 多个修饰符
    page-header__button–primary-light-active
  4. 没有块
    circle-button–primary
  5. 组合使用
     <div class="page">
        <div class="page-header">
          <button class="page-header__button--sure"></button>
          <button class="page-header__button--cancel"></button>
        </div>
        <div class="page-content">
    
        </div>
        <div class="page-footer"></div>
      </div>
    
上一篇:MySQL join的自动优化


下一篇:【Android】No resource found that matches the given name 'Theme.Sherlock.Light.NoActionBar'