0
When I wrote the animation codes on my computer, I found it didn't work, so what do I do for these codes to work?
css codes
12 Réponses
+ 3
Share your code so we can help you. There is a tiny chance we’ll be able to guess your code then fix it.
+ 3
Would you put your code on code playground, here in sololearn, and give the link to it in that thread, so we can see what else could cause issue?
+ 2
Sohaila Sherif Omar Maybe try adding vendor prefixes...
+ 1
Sohaila Sherif Omar,
On playground it works, so if not on your computer, have you used style tags within the html or external CSS ?
If so, have you provided the link to your CSS with correct path ?
If it still doesn't work, you could try to put your html and CSS file in the w3validator to see if you have some errors or warnings at some points.
https://validator.w3.org/
This link gives you the page to check your html, and under the inputs you have some other links to check CSS.
+ 1
you have not given background-color property in css of body tag ???
Add
Background-color:teal ; in body tag
Hope it will work.
+ 1
You mean, it was working on the other pc ?
+ 1
So, if you wrote the exact same codes on both, it's mistery🤔...
0
body {
animation-name:colorchange;
animation-duration:20s;
animation-iteration-count: infinite;
}
@keyframes colorchange {
20% {background-color: red;}
40% {background-color: orange;}
60% {background-color: yellow;}
80% {background-color: green;}
100% {background-color: blue;}
}
0
I tried everything you told me, but it was futile, so what should I do?
0
I wrote the same codes on another computer, and I did the codes
0
Yes
0
In the Windows version or the computer itself