You can come close to keyframes if you first plunged into a nickname before switching between insertion and shadow shadow. (You cannot animate this directly, because they are keywords, not numeric values, that is, the shadows are “almost Inset”).
Consider the following css:
.box {
box-shadow: inset 0 0 10px #aaa;
animation: shadowFadeOut 1s;
}
.box:hover {
box-shadow: 0 0 10px #aaa;
animation: shadowFadeIn 1s;
}
@/*add prefixes*/keyframes shadowFadeIn {
0% { box-shadow: inset 0 0 10px #aaa; }
50% { box-shadow: none; }
100% { box-shadow: 0 0 10px #aaa; }
}
@/*add prefixes*/keyframes shadowFadeOut {
0% { box-shadow: 0 0 10px #aaa; }
50% { box-shadow: none; }
100% { box-shadow: inset 0 0 10px #aaa; }
}
webkit : http://jsfiddle.net/xq4qc/1/
, , , .