CSS 透视法则和数值有区别吗?

Is there any difference between CSS perspective rule and value?

这两个有什么区别吗?

perspective: 600px;
transform: perspective(600px);

...the perspective property doesn't affect how the element is rendered; it simply enables a 3D-space for children elements. This is the main difference between the transform: perspective() function and the perspective property. The first gives element depth while the later creates a 3D-space shared by all its transformed children.

完整文章可在此处找到:https://css-tricks.com/almanac/properties/p/perspective/

还有一个类似的问题:What is the difference between perspective and transform's perspective properties in CSS?

所以主要区别似乎是您是否希望以相同的方式将视角应用于所有 children(transform: perspective 将应用于 parent),或者如果您希望 child 元素有自己的视角。

根据this website有。

These two formats both trigger a 3D space, but there is a difference. The functional notation is convenient for directly applying a 3D transform on a single element ... But when used on multiple elements, the transformed elements don’t line up as expected. If you use the same transform across elements with different positions, each element will have its own vanishing point. To remedy this, use the perspective property on a parent element, so each child may share the same 3D space.