Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scale from left to right only

Tags:

html

css

scale

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

like image 766
user94 Avatar asked Jun 22 '17 08:06

user94


People also ask

How do you scale One direction in CSS?

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.

How do I scale down CSS?

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.

How do you scale up CSS?

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.

How do you scale in HTML?

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.


1 Answers

I believe the transform-origin can be helpful here:

body {
    transform:scale(0.67);
    transform-origin:left center;
}
like image 60
razemauze Avatar answered Sep 18 '22 19:09

razemauze