哪个更快:重复样式还是重复选择器?

Jas*_*son 5 css

我想知道以下哪个例子会更好.如果性能相同,哪一个读得更好?

示例1(重复选择器)

.helpfulCommenter, .questionTroll { color: #f00; }

.questionTroll { text-decoration: line-through; }

.helpfulCommenter { color: #f00; }

.questionTroll { color: #f00; text-decoration: line-through; }

.helpfulCommenter, .questionTroll { color: #f00; }

.questionTroll { text-decoration: line-through; }

要么

示例2(重复样式)

.helpfulCommenter { color: #f00; }

.questionTroll { color: #f00; text-decoration: line-through; }

.helpfulCommenter, .questionTroll { color: #f00; }

.questionTroll { text-decoration: line-through; }

.helpfulCommenter { color: #f00; }

.questionTroll { color: #f00; text-decoration: line-through; }

我知道类名不是语义,这里展示的特定样式是无关紧要的.我只是想知道哪些浏览器更容易解析和实现.

xan*_*ded 2

性能差异是如此微小,以至于无关紧要。

避免使用示例 2,因为如果滥用,它很可能会成为令人头痛的维护问题。