我们都知道transform-origin是用来改变元素基点的,元素默认的基点是中心。
我们先看一个栗子:
注意下图高度缩小一半时,是以中心点为基点缩小
当我们在加上transform-origin:50% 100%时,基点明显下移,这时的基点在左下角:
一般的旋转点有,左上(top left),左下(left bottom),右上(right top),右下(right bottom),中心点(center center)五个。
我们都知道transform-origin是用来改变元素基点的,元素默认的基点是中心。
我们先看一个栗子:
注意下图高度缩小一半时,是以中心点为基点缩小
当我们在加上transform-origin:50% 100%时,基点明显下移,这时的基点在左下角:
一般的旋转点有,左上(top left),左下(left bottom),右上(right top),右下(right bottom),中心点(center center)五个。