Look at the effect

I am participating in the creation activity of the Nuggets newcomer to start the road of writing together.

Implementation method – main code

index.html

<div class="bounce">
	<span class="letter">orange</span>
	<span class="letter">small</span>
	<span class="letter">city</span>
	<span class="letter">-</span>
	<span class="letter">2</span>
	<span class="letter">0</span>
        <span class="letter">2</span>
        <span class="letter">1</span>
        <span class="letter">1</span>
        <span class="letter">2</span>
        <span class="letter">0</span>
        <span class="letter">2</span>
</div>
Copy the code

index.css

html.body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #2d303a;
  overflow: hidden;
}

.bounce {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
	color: white;
  height: 100%;
  font: normal bold 6rem "Product Sans", sans-serif;
  white-space: nowrap;
}

.letter {
  animation: bounce 0.75 s cubic-bezier(0.05.0.0.2.1) infinite alternate;
  display: inline-block;
  transform: translate3d(0.0.0);
  margin-top: 0.5 em;
  text-shadow: rgba(255.255.255.0.4) 0 0 0.05 em;
  font: normal 500 6rem 'Varela Round', sans-serif;
}
.letter:nth-child(1) {
  animation-delay: 0s;
}
.letter:nth-child(2) {
  animation-delay: 0.0333333333 s;
}
.letter:nth-child(3) {
  animation-delay: 0.1333333333 s;
}
.letter:nth-child(4) {
  animation-delay: 0.2333333333 s;
}
.letter:nth-child(5) {
  animation-delay: 0.3333333333 s;
}
.letter:nth-child(6) {
  animation-delay: 0.4333333333 s;
}
.letter:nth-child(7) {
  animation-delay: 0.5333333333 s;
}
.letter:nth-child(8) {
  animation-delay: 0.6333333333 s;
}
.letter:nth-child(9) {
  animation-delay: 0.7333333333 s;
}
.letter:nth-child(10) {
  animation-delay: 0.8333333333 s;
}
.letter:nth-child(11) {
  animation-delay: 0.9333333333 s;
}

@keyframes bounce {
  0% {
    transform: translate3d(0.0.0);
    text-shadow: rgba(255.255.255.0.4) 0 0 0.05 em;
  }
  100% {
    transform: translate3d(0, -1em.0);
    text-shadow: rgba(255.255.255.0.4) 0 1em 0.35 em; }}Copy the code