Everyone must have heard of the popular VR and naked-eye 3D. Today I will introduce to you how to convert 2D and 3D effects in HTML.
transform:
rotate() rotationfunction (deg)
deg degree
skew(X,Y) tilt function (deg)
skewX()
skewY()
scale(X,Y) scaling function (positive, negative and decimal)
scaleX ()
scaleY()
translate(X,Y) displacement function (px)
translateX()
translateY()
transform Abbreviation execution sequence (write last, execute first)
transform-style (preserve-3d) Create 3D space
perspective mirror
perspective- origin mirror base point
%transform Newfunction
scaleZ()
transform-origin: x,y; base point of rotation
x : left/center/right/length/%
y : top/center/bottom/length/%
z : length
I believe you have mastered the method after reading these cases. For more exciting information, please pay attention to other related matters on the php Chinese website article!
Related reading:
Common ways for Js to obtain stylesImplementation steps for Js to operate window objects
Js operates non-IE event object properties, detailed introduction of methods
The above is the detailed content of How to convert HTML 2d and 3d. For more information, please follow other related articles on the PHP Chinese website!