Questions tagged [transition]

DO NOT USE! THIS TAG IS AMBIGUOUS. Try to use a less ambiguous tag like [css-transitions], [android-animation] or [ios-animations] [pytransitions] if possible.

5240 questions
28
votes
1 answer

Apply CSS transition when element comes into viewport

I'm trying to apply CSS transition effect when an element comes to viewport (i.e. when user scrolls to it), but not before. I already know how to use CSS transitions, but how do I apply them only when the element comes to viewport? What it the best…
ZeiZei
  • 419
  • 1
  • 4
  • 6
27
votes
3 answers

SwiftUI conditional view will not animate/transition

I’m trying to get my views to animate/transition using .transition() on views. I use similar code from here and put .transition() to both conditional views. struct Base: View { @State private var isSignedIn = false var body: some View { …
leftysauce
  • 403
  • 1
  • 4
  • 7
27
votes
3 answers

Smooth vue collapse transition on v-if

I'm struggling with vue transitions trying to show / hide content using v-if smoothly. Whilst I understand the css classes and transitions, I can make the content appear 'smoothly' using things like opacity or translation etc...but once the…
The Wideboy
  • 273
  • 1
  • 3
  • 6
27
votes
4 answers

Perform a segue programmatically

Hi I'm trying to perform a segue programmatically without the Storyboard. Currently I have this as my code: override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "popOutNoteExpanded" { let vc =…
ajayb
  • 633
  • 1
  • 9
  • 23
27
votes
5 answers

overridePendingTransition for sliding activities in and out smoothly

I'm having trouble figuring out how to slide activities in and out with a push of a button. What I want is for the user to push a button and then the screen slides. The way I want it is for the 1st activity (the one with the button) to slide out…
Matt
  • 3,882
  • 14
  • 46
  • 89
27
votes
2 answers

How to transition only rotate transformation?

I'm using a bunch of elements to compose a background image and they all absolutely position around, rotating freely. Problem is, I would like to transition only the rotation of those objects, not the top nor left properties. And apparently…
Digger
  • 718
  • 1
  • 9
  • 22
26
votes
8 answers

No CSS transition for 'height: fit-content'

I use transition: height 500ms to add an animation to an element that slides open via button from height: 0 to height: 100px and vice versa. Since the element's content is added dynamically and I don't know its size I would like to switch to height:…
Sebastian Barth
  • 4,079
  • 7
  • 40
  • 59
26
votes
4 answers

Android make transition on activity recreate()

I would like to put a transition on activity recreate() after changing theme, is it possible? I tried: @android:anim/fade_in @android:anim/fade_out but it didn't work, and that will also affect the transition when I open and close activity, but I…
4face
  • 590
  • 1
  • 8
  • 18
26
votes
3 answers

Swapping child views in a container view

Let ContainerView be the parent container view with two child content views: NavigationView and ContentView. I would like to be able to swap out the controller of ContentView with another view. For example, swapping a home page controller with a…
Alex
  • 1,233
  • 2
  • 17
  • 27
25
votes
6 answers

CSS Transition Not Firing

I'm creating a DOM element (a div), adding it to the DOM, then changing its width all in one quick hit in javascript. This in theory should trigger a CSS3 transition, but the result is straight from A to B, without the transition in between. If I…
Kong
  • 8,792
  • 15
  • 68
  • 98
25
votes
4 answers

CSS: How to scale an image from the center instead of top-left

So my problem is that I have an image and I set its CSS to have a max-width: 100% which scales it at lower resolutions ( as will be seen in the fiddle below ). What I want is for the transition to take effect from the center of the…
Eolis
  • 645
  • 2
  • 9
  • 22
25
votes
4 answers

iOS7, backgroundImage for UISearchBar

I'm making the transition of the UI between iOS 6 and iOS 7. We have a UISearchBar related to a UISearchDisplayController, I have set the backgroundImage of the navigationBar and the searchBar to a 1x1 image dynamically created with a color.…
Geraud.ch
  • 1,499
  • 10
  • 15
24
votes
2 answers

webkit-transition height for a div with a dynamic changing height based on content?

please see the following jsFiddle http://jsfiddle.net/SgyEW/10/ You can click the various buttons which shows different length content which causes the box to grow/shrink. I want the height change to be animated so it is not so jumpy, I tried this…
TheExit
  • 5,220
  • 12
  • 37
  • 49
24
votes
2 answers

How to change presentViewController Transition animation

I'm using presentViewController to change from a view to another without Navigation Controller like: let HomeView = self.storyboard!.instantiateViewControllerWithIdentifier("HomeView") as! ViewControllerHome self.presentViewController(HomeView,…
Stranger B.
  • 9,004
  • 21
  • 71
  • 108
23
votes
5 answers

Fragment Transactions with transition - Unique transitionNames are required

I want to go from a list view to the detail view and therefore, I use following OnClickListener in my list: @Override public void onClick(View view) { Bet bet = (Bet)view.getTag(); FragmentManager fm =…
prom85
  • 16,896
  • 17
  • 122
  • 242