I use properties -webkit-animationto rotate form elements in their places when the user first views the page.
For this, I use the following code:
.bounce {
-webkit-animation-name: bounceup;
}
@-webkit-keyframes bounceup {
from {
opacity:0.5;
-webkit-transform: translateY(100px) rotate(180deg);
-webkit-box-shadow: 20px 20px 80px #000;
}
to {
opacity:1;
-webkit-transform: translateY(0px) rotate(0deg);
}
}
server code is PHP. in every form element in my php class I had a rebound class and I add an inline property with a name -webkit-animation-durationthat I increment by 0.18 between each element.
php code:
private $animationDuration=0.7;
private function _getAnimationDuration() {
$ret= '-webkit-animation-duration: '.$this->animationDuration.'s';
$this->animationDuration+=0.1;
return $ret;
}
Here I add a property called 'style' to each form element with the result of the function _getAnimationDuration().
Question: can I somehow implement the _getAnimationDuration () function using pure CSS3 and HTML5 (without JavaScript)?
css , . .