.box::before { content: 'Hello World'; position: relative; z-index: -1; } .box::after { content: ''; position: absolute; bottom: calc(50% + .5em); left: calc(50% - 2.75em); z-index: -1; width: .5em; height: 11em; color: #fff; background-color: currentColor; box-shadow: .5em -1em, 1em -2em, 1.5em -3em, 2em -4em, 3em -5em, 3.5em -6em, 4em -7em, 4.5em -8em, 5em -9em; } .box:hover::after { transform: translate(0, 10em); transition: transform 5s linear; }