Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 944701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:38:09+00:00 2026-05-15T22:38:09+00:00

Given the following CSS3 animation…. <style type=text/css media=screen> .drop_box { -webkit-animation-name: drop; -webkit-animation-duration: 2s;

  • 0

Given the following CSS3 animation….

<style type="text/css" media="screen">

.drop_box {
  -webkit-animation-name: drop;
  -webkit-animation-duration: 2s;
  -webkit-animation-iteration-count: 1;
}

@-webkit-keyframes drop {

  from {
    -webkit-transform: translateY(0px);
  }

  to {
    -webkit-transform: translateY(100px);
  }

}
</style>

<div class="drop_box">  
    Hello world
</div>

The Hello World text animates as expected dropping down 100px. However, at the end of the animation it jumps back to its original position.

Clearly this makes sense in CSSland. The animation has been applied and is no longer acting on the element so the original styles take effect. It seems slightly odd to me though – surely if one is animating an element into place then one would expect that placing to persist?

Is there any way of making the end position ‘sticky’ without having to resort to Javascript to tag a classname or style onto the element at the end of the animation to fix its altered properties? I know that transitions persist, but for the animation I have in question (the example is for demonstration purposes only) transitions don’t give the level of control needed. Without this, it seems that complex animations are only of use for circular processes where the element ends up back in its original state.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:38:10+00:00Added an answer on May 15, 2026 at 10:38 pm

    If you define the end state in the class then it should do what you want in the example:

    .drop_box {
        -webkit-transform: translateY(100px);
        -webkit-animation-name: drop;
        -webkit-animation-duration: 2s;
        -webkit-animation-iteration-count: 1;
    }
    

    But if your animation is event driven anyway you will probably end up having to use a bit of JavaScript. The easiest way is to make the adding of the class with the end state in it be what triggers the animation to start.

    –edit

    See dino’s answer for information on the animation-fill-mode property added in the April 2012 WD.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given following HTML <select name="IBE1$IBE_NurFlug1$ddl_Abflughafen" id="IBE1_IBE_NurFlug1_ddl_Abflughafen" class="dropdownlist" style="width: 99%;"> <option value="Antalya;TR">Antalya</option> <option value="Berlin;DE">Berlin</option> <option
given following html <input id=IBE1_IBE_NurFlug1_RadioButtonList1_0 name=IBE1$IBE_NurFlug1$RadioButtonList1 value=Blue type=radio> <label for=IBE1_IBE_NurFlug1_RadioButtonList1_0>Blue</label> <input id=IBE1_IBE_NurFlug1_RadioButtonList1_1 name=IBE1$IBE_NurFlug1$RadioButtonList1 value=Green
Given the following data structure var things = [{ name: thing1, sex: male}, {
Given following Ruby statements: (Read input and store each word in array removing spaces
// given following array: $data = array( 0=>array( data=>object1, col=>array( 0=>array( data=>object2, col=>array( 0=>array(
Given the following class, which simply maps an internal functor f to a function
Given the following code, I try to implement the public static Point operator +(int
Given the following definitions Foo has_many :bars, :dependent => :nullify, :autosave => false Bar
Given the following: <%= link_to Add, group_request_path(gr), :confirm => Are you sure?, :method=> :put,
Given the following data table definitions in SQLite Version 3.7.5: CREATE TABLE [Books] (

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.