मैं इस सीएसएस कोड का उपयोग कर रहा मैं बेला पर पाया मेरी पहिया स्पिन:सीएसएस कताई पहिया 5 सेकंड के बाद बंद करो?
http://jsfiddle.net/gaby/9Ryvs/7/
div {
margin: 20px;
width: 100px;
height: 100px;
background: #f00;
-webkit-animation-name: spin;
-webkit-animation-duration: 4000ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-name: spin;
-moz-animation-duration: 4000ms;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
-ms-animation-name: spin;
-ms-animation-duration: 4000ms;
-ms-animation-iteration-count: infinite;
-ms-animation-timing-function: linear;
animation-name: spin;
animation-duration: 4000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@-ms-keyframes spin {
from { -ms-transform: rotate(0deg); }
to { -ms-transform: rotate(360deg); }
}
@-moz-keyframes spin {
from { -moz-transform: rotate(0deg); }
to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
मूल रूप से मैं कताई वास्तव में के बाद यह 1800 degress तक पहुँच जाता है बंद करना चाहते हैं, और फिर 0 के लिए वापस जाओ तो मैं इसे बाद में फिर से स्पिन कर सकता हूं।
क्या ऐसा करना संभव है?
आपके जेएसफ़िल्ड को अपडेट किया गया, क्रोम में मेरे लिए ठीक काम करता है। – PlantTheIdea
स्पिन 555ms प्रति 360 डिग्री पर चल रहा है (सुनिश्चित नहीं है, कृपया बेवकूफ या कोड देखें)। कोड पर, यह 4000ms है, लेकिन इसे 555ms में बदलें। मैं एक जावास्क्रिप्ट टाइमआउट बनाना चाहता हूं, इसलिए यह आईएमजी को एक स्थानांतरित करने के लिए बदल देगा। कुल में कितना एमएस? (555 * 4) क्या यह सही है? –
जब मैं इसे क्रोम पर चलाता हूं, तो प्रत्येक रोटेशन 4s (4000ms) लंबा होता है। यदि आप कुल 4000ms में सभी 5 रोटेशन करना चाहते हैं, तो 800ms (4000/5) करें। – PlantTheIdea