案例:CSS3案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style> 
5
div
6
{
7
width:100px;
8
height:100px;
9
background:yellow;
10
transition:width 2s, height 2s;
11
-moz-transition:width 2s, height 2s, -moz-transform 2s; /* Firefox 4 */
12
-webkit-transition:width 2s, height 2s, -webkit-transform 2s; /* Safari and Chrome */
13
-o-transition:width 2s, height 2s, -o-transform 2s; /* Opera */
14
}
15
16
div:hover
17
{
18
width:200px;
19
height:200px;
20
transform:rotate(180deg);
21
-moz-transform:rotate(180deg); /* Firefox 4 */
22
-webkit-transform:rotate(180deg); /* Safari and Chrome */
23
-o-transform:rotate(180deg); /* Opera */
24
}

 运行结果 
 北美留学生论坛