我正在使用谷歌页面速度,它告诉我我的 css 效率低下......
非常低效的规则(适合在任何页面上修复):
* table.fancy thead td Tag key with 2 descendant selectors and Class overly qualified with tag
* table.fancy tfoot td Tag key with 2 descendant selectors and Class overly qualified with tag
CSS规则是
table.fancy {border: 1px solid white; padding:5px}
table.fancy td {background:#656165}
table.fancy thead td, table.fancy tfoot td {background:#767276}
我希望页眉和页脚的背景颜色与表的主体(数据表)不同
- 这是因为什么原因是低效的?
- 如何让它更有效率?
为了谷歌的缘故,我不会在 thead 和 tfoot 中添加一个类。