0

Consider the following plunker

I am trying to make the list of number slide left upon enter and slide left upon leave.

enter image description here

Here is my css

.stuff {
  display: inline-block;
  margin-left: 10px;
}

button {
  display: block;
}

.stuff.ng-enter,
.stuff.ng-leave {
    -webkit-transition: all 1s ease-in-out;

}

.stuff.ng-enter {
    left: 100%;
}
.stuff.ng-enter-active {

    left: 0;
}

.stuff.ng-leave {
    left: 0;
}
.stuff.ng-leave-active {
    left: -100%;
}

I verified that if I change positioning transition to opacity it works, but for some reason giving the animation left or right doesn't work.

Can someone help me out?

Thanks

1 Answer 1

1

Just had a look at your code, i'd recommend you add position to your styling. you can find the changes here

i just made a small change to the class.

.stuff.ng-enter,.stuff.ng-leave {

 -webkit-transition: all 1s ease-in-out;
 position:relative;

}

Hope this answers the question .

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.