How to scale from left to right only

烈酒焚心 提交于 2020-01-11 09:44:06

问题


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


回答1:


I believe the transform-origin can be helpful here:

body {
    transform:scale(0.67);
    transform-origin:left center;
}



回答2:


You add transform-origin which define from which position the transform should occur.

Its default value is center center (50% 50%) and you need left center (0 50%)

body
{
  transform: scaleX(0.67);
  transform-origin: left center;
}


来源:https://stackoverflow.com/questions/44694230/how-to-scale-from-left-to-right-only

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!