样式篇

  • pointer-events:pointer-events: auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted
    控制DOM元素不能点击

  • box-sizing:border-box
    计算width的时候如果包含此属性,实际width=innerWidth,不用重复加上padding和border值
    若无:实际width = padding+border+innerWidth

  • flex
    http://www.ruanyifeng.com/blog/2015/07/flex-examples.html

  • 微信小程序使用weui样式
    http://blog.csdn.net/chq1988/article/details/73549027

  • 移动端font-family设置

    image.png

    https://segmentfault.com/a/1190000006110417
    安卓和苹果系统自带的字体不一致,对不同字体的渲染效果也不一致,故需要设定下一个比较统一的字体
    body{
    font-family: 'PingFangSC-Regular','Avenir',Helvetica,Arial,sans-serif;
    }
    中引文整合写法:
    font-family: Helvetica, Tahoma, Arial, "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei";
    font-family: Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei";

你可能感兴趣的:(样式篇)