x
 
1
<!doctype html>
2
<title>Example</title>
3
<style>
4
#grid {
5
  display: grid;
6
  grid-template-columns: auto auto auto;
7
  grid-auto-rows: 20vh;
8
  grid-gap: 10px;
9
  animation: myAnimation 5s ease 1s 5 alternate forwards;
10
}
11
#grid > div {
12
  background-color: tomato;
13
  color: white;
14
  font-size: 4vw;
15
  padding: 10px;
16
}
17
18
@keyframes myAnimation {
19
  30% {
20
  grid-auto-rows: 10vh;
21
  }
22
  60% {
23
  grid-auto-rows: 10vh 20vh 40vh;
24
  }
25
</style>
26
<div id="grid">
27
  <div>1</div>
28
  <div>2</div>
29
  <div>3</div>
30
  <div>4</div>
31
  <div>5</div>
32
  <div>6</div>
33
  <div>7</div>
34
  <div>8</div>
35
  <div>9</div>
36
</div>