We would like to know how to rotate text.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.spin {<!-- w w w. j ava2s . c om-->
background-color: rgba(255, 255, 255, .01);
-webkit-animation: spin 2s infinite linear;
-moz-animation: spin 2s infinite linear;
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
animation: spin 2s infinite linear;
transform-style: preserve-3d;
float: left;
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
100% {
-moz-transform: rotate (359 deg);
transform: rotate (359 deg);
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
}
@-webkit-keyframes spin
{
0% {
-webkit-transform: rotate (0deg);
transform: rotate (0deg);
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
100% {
-webkit-transform: rotate (359 deg);
transform: rotate (359 deg);
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
}
@-ms-keyframes spin
{
0% {
-ms-transform: rotate (0deg);
transform: rotate (0deg);
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
100% {
-ms-transform: rotate (359 deg);
transform: rotate (359 deg);
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
}
@-o-keyframes spin
{
0% {
-o-transform: rotate (0deg);
transform: rotate (0deg);
transform-style: preserve-3d;
}
100% {
-o-transform: rotate (359 deg);
transform: rotate (359 deg);
transform-style: preserve-3d;
}
}
@keyframes spin
{
0% {
-webkit-transform: rotate (0deg);
-moz-transform: rotate (0deg);
-o-transform: rotate (0deg);
-ms-transform: rotate (0deg);
transform: rotate (0deg);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
100% {
-webkit-transform: rotate (359 deg);
-moz-transform: rotate (359 deg);
-o-transform: rotate (359 deg);
-ms-transform: rotate (359 deg);
transform: rotate (359 deg);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
}
</style>
</head>
<body>
<div class="spin">java2s.com</div>
</body>
</html>
The code above is rendered as follows: