Click here to Skip to main content
15,883,928 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am working on css3 in vs2010. Trying some animation. but intellisense is giving error "Unrecognized @ block type" and " keyframe is not a known css property name". Below is some i have tried.


CSS
@-webkit-keyframes animt1 {
0%   {background-color:red; left:0px; top:0px;}
25%  {background-color:yellow; left:200px; top:0px;}
50%  {background-color:blue; left:200px; top:200px;}
75%  {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
@keyframes animt1 {
from {background-color: red;}
to {background-color: yellow;}


Kindly help me out. Thanks in advance.
Posted

1 solution

Not sure about the issue but definitely you are missing two closing curly barces.
CSS
@-webkit-keyframes animt1 {
  0%   {background-color:red; left:0px; top:0px;}
  25%  {background-color:yellow; left:200px; top:0px;}
  50%  {background-color:blue; left:200px; top:200px;}
  75%  {background-color:green; left:0px; top:200px;}
  100% {background-color:red; left:0px; top:0px;}
}
@keyframes animt1 {
  from {background-color: red;}
  to {background-color: yellow;}
}

Hope this adds something to the solution you are looking for :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900