Skip to content

scale() ​

描述 ​

scale() CSS 函数在水平和垂直方向或同时在两个方向上缩放二维空间中的元素。缩放可以向上和向下进行。

语法 ​

css
transform: scale(<numberX> [, <numberY>]?);
/* the question mark indicates the second value is optional */

值 ​

  • <numberX> 元素的水平比例。
  • <numberY> 项目的垂直比例。如果未指定值,则默认为 。

效果展示 ​