Animation does not work?
1 minute ago, stefanmz said:yeah but that will make it invisible in the beginning of the animation and then it will become visible go and then become invisible again,right?(the animated bullet)because that's what I want
The javascript I added makes the bullet invisible at first. You need to set a condition to remove the .hidden_object class like an event like clicking a button or press a key on the keyboard. To make it invisible again, use setTimeOut to add the class back in once the time expires. The setTimeOut function will be triggered by the event.
Side note: I haven't really tried animating things with pure CSS, I think you will have a better control with animation timings in JavaScript. You can make changes to the visual effects by playing around with adding and removing classes that correspond to a CSS rule like what I did.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now