Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create an CSS3 animation that starts after X seconds

Im trying to create an animation for a "help window". I would like it to start or have the the image/animation after X seconds, but am having issues as the animation-delay property isn't applicable here as it pauses the still image before playing it.

Any ideas for webkits or properties to try here?

See link here; http://hardystewartdesign.com/dist/project.html

    .hello {
    width: 211px;
    height: 115px;
    background: none;
    position: fixed;
    bottom: 0px;
    left: 0px;
    -webkit-animation: mymove 3s;  /* Chrome, Safari, Opera */
    -webkit-animation-iteration-count: 1;  /* Chrome, Safari, Opera */
    -webkit-animation-fill-mode: forwards;  /* Chrome, Safari, Opera */
    animation: mymove 3s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;

}
/* Chrome, Safari, Opera */
@-webkit-keyframes mymove {
    from {left: -300px;}
    to {left: 0px;}

}

@keyframes mymove {
    from {left: -300px;}
    to {left: 0;}
}
like image 877
Hardy Avatar asked May 28 '15 18:05

Hardy


People also ask

How do you delay start animation in CSS?

CSS Animation Delay Syntax The CSS animation-delay property has the following syntax: animation-delay: [time] | initial | inherit; As you can see, there are three possible values: time, initial, and inherit. The first option is [time], which is the number of seconds or milliseconds before the animation starts.

Which CSS property can be used to define a delay before an animation starts?

The animation-delay CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation.

Can we create animation using css3?

CSS allows animation of HTML elements without using JavaScript or Flash! In this chapter you will learn about the following properties: @keyframes. animation-name.

How do I create an animation in CSS?

Let's start by creating a CSS animation. CSS animations are defined by keyframes. You can name your animation anything you want. I've defined an animation where the element will grow wide and then tall. Once your keyframes are defined, you can use the animation on an element by setting the animation-name property to the name of your keyframes.

What is the use of animation-duration time in CSS?

It is used to define a time before the animation starts. The value passed is in seconds or ms as well as animation-duration, and in the shorthand form of writing is always considered the value in seconds/ms that comes after the animation-duration time. e.g. animation: rotate 2s 1s;

Is there a way to restart a CSS animation?

With CSS animations (ala @keyframes) it’s not as easy as you might think to “restart” it. Let’s say you set it to run once: You have that run on, say, your logo: Then for some reason you want to have that animation run again, perhaps on a click. You might think CSS provides a way to kick it off again, but as far as I know it doesn’t.

When to use a transition instead of a CSS animation?

If your animation only has one step, such as fading an element's opacity from 0 to 1, you can use a CSS transition instead of a CSS animation. The method is essentially the same.


1 Answers

just change left: 0 to left: -300px in the .hello class

like image 69
errnesto Avatar answered Sep 29 '22 14:09

errnesto