1-webkit-transition: all .3s ease-in-out;
2-moz-transition: all .3s ease-in-out;
3-o-transition: all .3s ease-in-out;
4-ms-transition: all .3s ease-in-out;
5transition: all .3s ease-in-out;
1div {
2 transition: all 0.5s ease;
3 background: red;
4 padding: 10px;
5}
6div:hover {
7 background: green;
8 padding: 20px;
9}
1/* Answer to: "css background color transition" */
2
3/*
4 Transitions currently work in Safari, Chrome, Firefox, Opera and
5 Internet Explorer 10+.
6
7 The following should produce a fade effect for you on the browsers
8 mentioned above:
9*/
10
11a {
12 background-color: #FF0;
13}
14
15a:hover {
16 background-color: #AD310B;
17 -webkit-transition: background-color 1000ms linear;
18 -ms-transition: background-color 1000ms linear;
19 transition: background-color 1000ms linear;
20}