Home > Web Front-end > HTML Tutorial > css3 翻转和旋转的区别_html/css_WEB-ITnose

css3 翻转和旋转的区别_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:18:43
Original
1222 people have browsed it

我以前一直以为旋转跟翻转一样,今日自己旋转了好久都发觉跟翻转差一点点,纠结了十几分钟才明白,只能怪自己的立体感太差了。

        css3中的transform中有旋转,放缩,倾斜,平移的功能,分别对应的属性是:rotate,scale,skew,translate

        旋转:(rotate)

-webkit-transform:rotate(10deg);  -moz-transform:rotate(10deg);  transform:rotate(10deg);  /* 何问起 hovertree.com */
Copy after login

翻转:(scale)

(这个属性是放缩的功能,怎么能翻转的!原来括弧里面(1,1)前者表示X轴,后者表示Y轴,当数字大于1时放大,大于0并小于1时缩小,负数代表翻转)

水平翻转:

-webkit-transform:scale(-1,1);  -moz-transform:scale(-1,1);  transform:scale(-1,1);  /* 何问起 hovertree.com */
Copy after login

垂直翻转:

-webkit-transform:scale(1,-1);  -moz-transform:scale(1,-1);  transform:scale(1,-1);/* 何问起 hovertree.com */  
Copy after login

在线示例:http://hovertree.com/code/css/css3dxuanzhuan.htm

特效:

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template