css3 has an image reduction attribute, which is Transform; the Transform attribute allows operations such as rotation, scaling, movement, and tilting of elements. When this attribute is used in conjunction with the scale method, you can set the image reduction. The syntax is: "Picture object {transform:scale(zoom factor)}".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
css3 has an image reduction attribute
The transform attribute applies a 2D or 3D transformation to the element. This property allows us to rotate, scale, move or tilt the element.
The scale(x,y) method defines 2D scaling transformation.
The example is as follows:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>css</title> <style> img{ transform:scale(0.5,0.5); } </style> </head> <body> <img src="1118.02.png" alt="Does css3 have an image reduction attribute?" > </body> </html>
Output result:
(Learning video sharing:
css video tutorial)
The above is the detailed content of Does css3 have an image reduction attribute?. For more information, please follow other related articles on the PHP Chinese website!