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.
@-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.
"@
" is being recognised as razor view syntax - and so it is expecting the next text to be part of the razor syntax.
Razor syntax pretty much is 'server side markup', meaning the line after it is seen as 'server side code' - whilst you're looking to have client side functionality here.
To fix this issue, you should be looking to use 'css files (.css)' in order to stop this syntax from being seen as razor syntax.
I.e: Place this information into a seperate css file, and then link the stylesheet into your <head>
section.
You could also use the escape character '@' to escape it out of the razor syntax:
For example;
@@-webkit-keyframes progressBar {
0% {
width: 0;
}
100% {
width: 100%;
}
}