Home>Article>Web Front-end> Can css3 make images tilt?
css3 can tilt the image; you can use the transform attribute with the skew() method to tilt the image. The transform attribute allows you to tilt the element. The skew() method is used to set the tilt transformation of the element. The syntax "picture element" {transform:skew(x-axis angle, y-axis angle)}”.
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
css3 can make the picture tilt
You can use the transform attribute and the skew() method.
The transform property applies a 2D or 3D transformation to an element. This property allows us to rotate, scale, move or tilt the element.
skew means "skew" and is a built-in function in css that needs to be used together with the transform attribute for skew transformation of elements.
The syntax is
skew(x-angle,y-angle)
Define a 2D tilt transformation along the X and Y axes.
Or:
skewX(angle) Defines a 2D skew transformation along the X-axis.
skewY(angle) Defines the 2D skew transformation along the Y axis.
The example is as follows:
Document
Output result:
(Learning video sharing:css video Tutorial)
The above is the detailed content of Can css3 make images tilt?. For more information, please follow other related articles on the PHP Chinese website!