Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

ant.design的虚拟列表发现了这样的属性值,很震惊。

image.png

css的单位中没有见过e这种的,而且计算的话要用calc,但这里居然直接就+拼接了,刷新了我的认知

求大佬们解释下?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
2.5k views
Welcome To Ask or Share your Answers For Others

1 Answer

css number

When written literally, a number is either an integer, or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits and optionally an exponent composed of "e" or "E" and an integer. It corresponds to the <number-token> production in the CSS Syntax Module [[CSS-SYNTAX-3]](https://drafts.csswg.org/css-... As with integers, the first character of a number may be immediately preceded by - or + to indicate the number’s sign.

5.00004e+06 就是 5.00004 x 10^6 = 5000040


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...