Set animation to have a "1" second delay before starting. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set animation to have a "1" second delay before starting.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
div {<!--  ww  w  . j  a  va  2s  .c om-->
    width: 100px;
    height: 100px;
    position: relative;
    background-color: red;
    animation-name: example;
    animation-duration: 2s;
    animation-delay: 1s;
}

@keyframes example {
    0%   {background-color: red; left:0px;}
    50%  {background-color: yellow; left:200px;}
    100% {background-color: red; left:0px;}
}
</style>
</head>
<body>

<div></div>

</body>
</html>

Related Tutorials