1、rotate 旋轉角度
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <style type="text/css"> div { width:200px; height:100px; background-color:yellow; /* Rotate div */ transform:rotate(30deg); -ms-transform:rotate(30deg); /* IE 9 */ -moz-transform:rotate(30deg); /* Firefox */ -webkit-transform:rotate(30deg); /* Safari and Chrome */ -o-transform:rotate(30deg); /* Opera */ } </style> </head> <body> <div>Hello</div> </body> </html>
2、translate(50px,100px); 偏移。(50px距離left, 100px距離top)
3、transform:scale(2,4); 拉伸。 (2為width擴大2倍,4為heigh擴大4倍)
4、skew(30deg,20deg); 30deg為水平上移動30度, 20deg為垂直上移動20度。