每次写大页面,都会纠结这个问题。究竟选择器对渲染效率产生多大影响,没有找到很详细的测试。
https://developer.mozilla.org/en/Writing_Efficient_CSS
http://www.stevesouders.com/blog/2009/06/18/simplifying-css-selectors/
而js对选择器就很敏感,至少能感觉到。
https://developer.mozilla.org/en/Writing_Efficient_CSS
http://www.stevesouders.com/blog/2009/06/18/simplifying-css-selectors/
而js对选择器就很敏感,至少能感觉到。