T
T
TheSnegok2021-07-12 15:10:47
css
TheSnegok, 2021-07-12 15:10:47

Is it possible to animate flex when adding content?

There is an initial search page:

<main class="App">
  <div class="container">
    <header class="AppHeader_App_header__3NGN2"></header>
  </div>
</main>

A div is added after the search:
<main class="App">
  <div class="container">
    <header class="AppHeader_App_header__3NGN2"></header>
    <div class="ContentFound_content__I_WkD"></div>
  </div>
</main>

App CSS code:
.App {
  position: relative;
  background: url("./img/bg.svg") no-repeat fixed;
  background-size: cover;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 3vh 10vw;
}

Is it possible to set a smooth animation for app or container so that it works with such changes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2021-07-13
@TheSnegok

First you move everything that should move, then you insert a new element and animate its appearance, then you clean up the garbage from the styles.

A
approximate solution, 2021-07-12
@approximate_solution

As an example:

If it doesn't fit, search the sandbox -
Link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question