.levitation { width: 20%; transform: rotate(15deg); filter: drop-shadow(22px -15px 5px rgba(0, 0, 0, 0.5)); animation: bouge 8s infinite alternate-reverse; } @keyframes bouge { /*starting point and angle (same angle as choosen into .levitation)*/ from { transform: translateY(0px) rotate(15deg); } /* ending point and angle */ to { transform: translateY(50px) rotate(30deg); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter