This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Sun, Earth, and Code Forum

View Course » View Exercise

1308 points
B23cebe47afa1e8c5f67e3ac6134d1fa?s=140&d=retro
Submitted by
hs1972
almost 3 years ago

6/7 How does the CSS animation work?

I don't really understand how any of the code that we've been asked to copy and paste works. Does anyone else know:

-webkit-animation: spin-right 10s linear infinite;
-moz-animation: spin-right 10s linear infinite;
-ms-animation: spin-right 10s linear infinite;
-o-animation: spin-right 10s linear infinite;
animation: spin-right 10s linear infinite;

and

@-webkit-keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}

@keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);


-3 votes

permalink

Hi hs1972,

I know how to use CSS keyframes, and do use them fairly often, but I'll need to know more about what you want to know before I can explain much.

2819 points
5674c6dae39efec455000434_879409444
Submitted by
Zeke Y
over 2 years ago