Home  >  Article  >  Web Front-end  >  Does css3 have an image reduction attribute?

Does css3 have an image reduction attribute?

WBOY
WBOYOriginal
2022-04-24 16:39:132170browse

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)}".

Does css3 have an image reduction attribute?

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

Does css3 have an image reduction attribute?

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:

Does css3 have an image reduction attribute?

##The original size is:

Does css3 have an image reduction attribute?

(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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is jquery sizzleNext article:What is jquery sizzle