formkit / auto-animate

A zero-config, drop-in animation utility that adds smooth transitions to your web app. You can use it with React, Vue, or any other JavaScript application.

Home Page:https://auto-animate.formkit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How should I use fixed centering layout?

FerretAngel opened this issue · comments

This is my container.
position: fixed;
top: 1em;
left: 50%;
transform: translateX(-50%);
However, its actual effect is like this.
85ec22908073614d58a4601b258f42b3
image
image

position: fixed;
width: 100vw;
display: flex;
flex-direction: column;
align-items: center;
pointer-events: none;
top: 1em;
z-index: 99999;
I solved it using 100% width and flex layout.