पहले 2 प्रश्नों का उत्तर spec द्वारा दिया गया है।
पाश करने के लिए: animation-iteration-count: infinite;
और पृष्ठभूमि रंग साइकिल एक @keyframes
नियम निर्दिष्ट शामिल है।
body { background: #0ff; }
@-webkit-keyframes blink {
0% { background: rgba(255,0,0,0.5); }
50% { background: rgba(255,0,0,0); }
100% { background: rgba(255,0,0,0.5); }
}
@keyframes blink {
0% { background: rgba(255,0,0,0.5); }
50% { background: rgba(255,0,0,0); }
100% { background: rgba(255,0,0,0.5); }
}
#animate {
height: 100px;
width: 100px;
background: rgba(255,0,0,1);
}
#animate {
-webkit-animation-direction: normal;
-webkit-animation-duration: 5s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-name: blink;
-webkit-animation-timing-function: ease;
animation-direction: normal;
animation-duration: 5s;
animation-iteration-count: infinite;
animation-name: blink;
animation-timing-function: ease;
}
(किसी भी लागू विक्रेता उपसर्गों भूल नहीं!)
जहाँ तक ब्राउज़र समर्थन चला जाता है के रूप में, मैं तुम्हें बारीकियों नहीं बता सकता, लेकिन किसी भी मामले में मैं सुविधा modernizr और एक के माध्यम से पता लगाने की सिफारिश करेंगे जावास्क्रिप्ट फॉलबैक।
यहां एक example है जो वेबकिट में काम करता है और कम से कम आपकी कुछ आवश्यकताओं को पूरा करता है। नोट: मैं मैक का उपयोग नहीं करता इसलिए मुझे आपके द्वारा संदर्भित प्रभाव के विनिर्देशों को सुनिश्चित नहीं किया गया था।
स्रोत
2011-06-17 19:46:12
इंटरनेट एक्सप्लोरर 10 CSS3 एनीमेशन और कीफ्रेम के साथ ठीक काम करता है :-) – juFo