CSS中有幂函数吗?

我知道您可以使用循环在Sass中编写幂函数。 CSS中有特定的一个吗?还是写一个的方式?

zihaishu 回答:CSS中有幂函数吗?

working group already approved such functions

CSS工作组刚刚讨论了trig,并同意以下内容:

已解决:添加sin()cos()tan()acos()asin()atan()atan2()hypot()sqrt()pow()

现在位于CSS Values and Units Module Level 4 Specification下:

指数函数pow()sqrt()hypot()log()和`exp() 用它们的参数计算各种指数函数。

pow(A,B)函数包含两个逗号分隔的计算A和B,两者都必须解析为<number> s,并将将A提高到B的幂的结果返回,将值返回为<number>

我们只需要等待浏览器对它们的支持

本文链接:https://www.f2er.com/2494158.html

大家都在问