css3-transitions
div{
transition-property: width;
transition-duration: 2s;
transition-timing-function: ease-out;
transition-delay : 1s;
}
/* One important thing to be aware of here is that there are two time values:
transition-duration and transition-delay, which must be declared in that
order. If only one is declared, the syntax presumes it is transition-duration,
and transition-delay will be set at the default (or inherited) value.
*/
/* Multiple Transition */
div{
transition: background-color 4s linear, left 4s ease-in-out, top 4s ease-in-out;
}
/* All Transition Properties */
/*
PROPERTY NAME TYPE
=======================
background-color || color
background-image || only gradients
background-position || percentage, length
border-bottom-color || color
border-bottom-width || length
border-color || color
border-left-color || color
border-left-width || length
border-right-color || color
border-right-width || length
border-spacing || length
border-top-color || color
border-top-width || length
border-width || length
bottom || length, percentage
color || color
crop || rectangle
font-size || length, percentage
font-weight || number
grid-* || various
height || length, percentage
left || length, percentage
letter-spacing || length
line-height || number, length, percentage
margin-bottom || length
margin-left || length
margin-right || length
margin-top || length
max-height || length, percentage
max-width || length, percentage
min-height || length, percentage
min-width || length, percentage
opacity || number
outline-color || color
outline-offset || integer
outline-width || length
padding-bottom || length
padding-left || length
padding-right || length
padding-top || length
right || length, percentage
text-indent || length, percentage
text-shadow || shadow
top || length, percentage
vertical-align || keywords, length, percentage
visibility || visibility
width || length, percentage
word-spacing || length, percentage
z-index || integer
zoom || number
*/
/**
animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-direction
animation-fill-mode
animation-play-state
**/
animation: bounce 300ms linear 100ms infinite alternate-reverse;
/* ^ ^ ^ ^ ^ ^
name duration timing-function delay count direction */
# Example:
animation: bounce 300ms linear 0s infinite normal;
animation: bounce 300ms linear infinite;
animation: bounce 300ms linear infinite alternate-reverse;
animation-name: bounce;
animation-delay: 100ms;
animation-duration: 300ms;
animation-direction: normal | reverse | alternate | alternate-reverse;
animation-iteration-count: infinite | <number>;
animation-timing-function: ease | linear | ease-in | ease-out | ease-in-out;
#EXAMPLE ANIMATION
.mob-img{
left: 300px;
top:8%;
-webkit-animation: mobIMGSlide 1.0s ease-in ;
-moz-animation: mobIMGSlide 1.0s ease-in ;
animation: mobIMGSlide 1.0s ease-in ;
position: absolute;
}
@-webkit-keyframes mobIMGSlide{
0%{
top: -100%;
-webkit-transform: translate(0, -100%);
-moz-transform: translate(0, -100%);
transform: translate(0, -100%);
opacity: 0;
}
50%{
top: -50%;
-webkit-transform: translate(0, -50%);
-moz-transform: translate(0, -50%);
transform: translate(0, -50%);
opacity: 0;
}
100%{
opacity: 1.0;
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@-moz-keyframes mobIMGSlide{
0%{
top: -100%;
-webkit-transform: translate(0, -100%);
-moz-transform: translate(0, -100%);
transform: translate(0, -100%);
opacity: 0;
}
50%{
top: -50%;
-webkit-transform: translate(0, -50%);
-moz-transform: translate(0, -50%);
transform: translate(0, -50%);
opacity: 0;
}
100%{
opacity: 1.0;
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@keyframes mobIMGSlide{
0%{
-webkit-transform: translate(0, -120%);
-moz-transform: translate(0, -120%);
transform: translate(0, -120%);
opacity: 0;
}
100%{
opacity: 1.0;
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
transform: translate(0, 0);
}
}