旋转rotate
用法:
transform:rotate(45deg);
一个参数角度,单位deg为度的意思,正数为顺时针旋转,负数为逆时针旋转,上述代码作用是顺时针旋转45度
div{
width:200px;
height:200px;
background-color:pink;
transform:rotate(55deg);
}
效果图:
缩放scale
用法:
transform:scale(0.5)或者transform:scale(0.5,2);
参数表示缩放倍数;
一个参数时:表示水平和垂直同时缩放该倍率
两个参数时:第一个参数指定水平方向的缩放倍率,第二个参数指定垂直方向的缩放倍率。
div{
width:200px;
height:200px;
background-color:pink;
transform:scale(0.5,1.2)
}


如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c56300.shtml