Transition without `position: absolute;`
See original GitHub issueIn demos,
<Lorem />
Component’s position is set to absolute
, So transition seems to work well.
https://github.com/maisano/react-router-transition/blob/master/demos/index.html#L36
but If you can’t set router’s position to absolute, (like each router’s height are different and it can be changed) transition wouldn’t work well.
I’ve tried to set position: absolute
on atLeave
only, but it didn’t work.
Also, I couldn’t figure out how to handle it using mapStyes
.
Any ideas? 😞
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:26 (3 by maintainers)
Top Results From Across the Web
Creating css transitions without using position:absolute
The best way to move elements around when animating is translating using css transforms. For example, to transition when hovering over the ...
Read more >Using CSS transitions - CSS: Cascading Style Sheets | MDN
CSS transitions provide a way to control animation speed when changing CSS properties. Instead of having property changes take effect ...
Read more >transition | CSS-Tricks
The transition property is a shorthand property used to represent up to four transition-related longhand properties:
Read more >Transitions with position: absolute • REPL • Svelte
import { fly, fade } from 'svelte/transition'; ... padding: 2em; text-align: center; margin-top: 20em; position:sticky; bottom:0; } ...
Read more >An Interactive Guide to CSS Transitions - Josh W Comeau
The main ingredient we need to create an animation is some CSS that changes. Here's an example of a button that moves on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The solution from @akeelm is very nice, but I still had a problem with the footer of the page to toggle up and down. Using code below this is fixed.
I only still have the footer problem when I toggle routes really quick.
I have a similar solution, it just fades only the appearing div, and hides the older one: