顏色漸變 CSS
div.color {
-webkit-transition: background-color 1s ease;
-moz-transition: background-color 1s ease;
-o-transition: background-color 1s ease;
transition: background-color 1s ease;
}
div.color:hover {
background-color: red;
}
大小漸變 CSS
div.resize {
-webkit-transition: width 1s ease, height 1s ease;
-moz-transition: width 1s ease, height 1s ease;
-o-transition: width 1s ease, height 1s ease;
transition: width 1s ease, height 1s ease;
}
div.resize:hover {
width: 150px;
height: 150px;
}
形狀漸變 CSS
div.shape {
-webkit-transition: border-radius 1s ease;
-moz-transition: border-radius 1s ease;
-o-transition: border-radius 1s ease;
transition: border-radius 1s ease;
}
div.shape:hover {
-webkit-border-radius: 80px;
-moz-border-radius: 80px;
-o-border-radius: 80px;
border-radius: 80px;
}
方向漸變 CSS
div.rotate {
border-radius: 80px;
-webkit-transition: -webkit-transform 3s ease;
-moz-transition: -moz-transform 3s ease;
-o-transition: -o-transform 3s ease;
transition: transform 3s ease;
}
div.rotate:hover {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}