页面渲染需要了解的东西
参考:
https://aerotwist.com/blog/pixels-are-expensive/
https://www.html5rocks.com/zh/tutorials/speed/high-performance-animations/
60FPS,是前台页面显示所追求的效果。
折算下来就是一帧需要 16.667ms
浏览器在每一帧所需要做的事情
js => style => layout => paint => composite
css 中常见的属性分类
参考:
https://csstriggers.com/
https://docs.google.com/spreadsheets/d/1Hvi0nu2wG3oQ51XRHtMv-A_ZlidnwUYwgQsPQUg1R2s/pub?single=true&gid=0&output=htmllayout:
width, height, padding, margin, display, border-width, border
top, position, font-size, float, background-color, border-color
text-aligin, overflow-y, font-weight, overflow, left, font-familiy
margin-bottom, padding-bottom, line-height, vertical-align, right,
clear, etcpaint:
color, border-style, visibility, background, text-decoration, background-image, background-position, background-repeat, etccomposite:
opacity, cursor, z-index