keyframe-selector-notation
为关键帧选择器指定关键字或百分比表示法。
¥Specify keyword or percentage notation for keyframe selectors.
@keyframes foo { from {} to {} }
/** ↑ ↑
* These notations */
关键字 from
相当于值 0%
。关键字 to
相当于值 100%
。
¥The keyword from
is equivalent to the value 0%
. The keyword to
is equivalent to the value 100%
.
fix
选项 可以自动修复此规则报告的所有问题。
¥The fix
option can automatically fix all of the problems reported by this rule.
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
string
:"keyword"|"percentage"|"percentage-unless-within-keyword-only-block"
"keyword"
关键帧选择器必须始终使用关键字表示法。
¥Keyframe selectors must always use the keyword notation.
以下模式被认为是一个问题:
¥The following pattern is considered a problem:
@keyframes foo { 0% {} 100% {} }
以下模式不被视为问题:
¥The following pattern is not considered a problem:
@keyframes foo { from {} to {} }
"percentage"
关键帧选择器必须始终使用百分比表示法。
¥Keyframe selectors must always use the percentage notation.
以下模式被认为是一个问题:
¥The following pattern is considered a problem:
@keyframes foo { from {} to {} }
以下模式不被视为问题:
¥The following pattern is not considered a problem:
@keyframes foo { 0% {} 100% {} }
"percentage-unless-within-keyword-only-block"
除非在仅限关键字的块中,否则关键帧选择器必须使用百分比表示法。
¥Keyframe selectors must use the percentage notation unless within a keyword-only block.
以下模式被认为是一个问题:
¥The following pattern is considered a problem:
@keyframes foo { from {} 100% {} }
以下模式不被视为问题:
¥The following patterns are not considered problems:
@keyframes foo { 0% {} 100% {} }
@keyframes foo { from {} to {} }