This is my css code
body
{
transform: scaleX(0.67);
}
In this my entire website shrink both from right and left.but i need only scale from left how can i do this
CSS scale() Function You can scale in the direction of the x -axis, the y -axis, or both. If you provide only one parameter, it will scale the element along both axes. If you provide two parameters, the first scales the element along the x axis, and the second parameter scales it along the y axis.
scale() The scale() CSS function defines a transformation that resizes an element on the 2D plane. Because the amount of scaling is defined by a vector, it can resize the horizontal and vertical dimensions at different scales. Its result is a <transform-function> data type.
The scale property in CSS resizes an element's width and height in proportion. So, if we have an element that's 100 pixels square, scaling it up by a value of 2 doubles the dimensions to 200 pixels square. Similarly, a scale value of . 5 decreases the dimensions in half, resulting in 50 pixels square.
One of the simplest ways to resize an image in the HTML is using the height and width attributes on the img tag. These values specify the height and width of the image element. The values are set in px i.e. CSS pixels.
I believe the transform-origin can be helpful here:
body {
transform:scale(0.67);
transform-origin:left center;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With