여러 요소에 다음 키 프레임 애니메이션을 사용합니다.
@keyframes redPulse {
from { background-color: #bc330d; box-shadow: 0 0 9px #333; }
50% { background-color: #e33100; box-shadow: 0 0 18px #e33100; }
to { background-color: #bc330d; box-shadow: 0 0 9px #333; }
}
@-webkit-keyframes redPulse {
from { background-color: #bc330d; box-shadow: 0 0 9px #333; }
50% { background-color: #e33100; box-shadow: 0 0 18px #e33100; }
to { background-color: #bc330d; box-shadow: 0 0 9px #333; }
}
.event_indicator {
display: inline-block;
background-color: red;
width: 5px;
margin-right: 5px;
-webkit-animation-name: redPulse;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: infinite;
animation-name: redPulse;
animation-duration: 1s;
animation-iteration-count: infinite;
}
내 컴퓨터에서 Chrome과 Firefox 모두 CPU 사용량이 약 40 %입니다. 애니메이션의 현재 상태 (좋지만 지금은 사용할 수 없음)입니까? 아니면 마법 속성이 누락 되었습니까?
동일한 애니메이션으로 다음 샘플을 확인할 수 있습니다. http://jsfiddle.net/Nrp6Q/