Home 3D CSS
Post
Cancel

3D CSS

3D

transform-style: flat vs transform-style: preserve-3d refer to link

  • The transform-style CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element, in short, preserve-3d 可以立体穿透。 demo

  • Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. Large values of perspective cause a small transformation; small values of perspective cause a large transformation, to sum up,perspective defines how far the object is away from the user.

how perspective works

This post is licensed under CC BY 4.0 by the author.