Har en fontello-icon som föreställer ett hjärta, som jag ska ha en "pounding" animation. Men det vill inte fungera. Är nybörjare på keyframes (har aldrig använt dem förut).
Såhär ser min kod ut:
html markup:
HTML-kod:
<i class="icon-heart"></i>
fontello setupen:
Kod:
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?23402899');
src: url('../font/fontello.eot?23402899#iefix') format('embedded-opentype'),
url('../font/fontello.woff?23402899') format('woff'),
url('../font/fontello.ttf?23402899') format('truetype'),
url('../font/fontello.svg?23402899#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-align: center;
}
.icon-heart:before { content: '\e80c'; } /* '' */
keyframe och lite mer css:
Kod:
@-webkit-keyframes pound {
to { transform: scale(1.4); }
}
.icon-heart {
color: #e00;
animation: pound .25s infinite alternate;
transform-origin: center;
}