'are transform : scale(x , y) and width and height same?

so I was just wondering transform: scale() does the same work as height and width property does as they both increase the x and y of an element

css


Solution 1:[1]

Not at all.

width and height are properties that affect the size of the element's box. You can learn more about the box model on MDN. If you change the size of an element's box, it can affect the disposition of its content, parent, and siblings.

transform lets you apply graphical effects to elements once their position and size has already been determined, but right before they are rendered. Moving or rescaling an element with a transform does not affect the page disposition and leaves all other elements exactly where they would have if you hadn't applied the transform.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Domino