"Floating Image Animation"
Bootstrap 4.1.1 Snippet by websterchannel

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="avatar"> <a href="#"> <img src="https://www.johnmeyerwebdev.com/images/Me-Avatar-Maker.svg" alt="Skytsunami" /> </a> </div> <div class="content"> <h1>Floating CSS animation</h1> </div> </div>
body,html { height: 100%; margin: 0; padding: 0; font-family: 'Helvetica', sans-serif; background-image: linear-gradient(to right top, #636f8b, #4962a2, #3252b5, #293cc4, #3c15cb); } .container { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; } .avatar { width: 200px; height: 200px; box-sizing: border-box; border: 5px white solid; border-radius: 50%; overflow: hidden; box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6); transform: translatey(0px); animation: float 6s ease-in-out infinite; } img { width: 100%; height: auto; } @keyframes float { 0% { box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6); transform: translatey(0px); } 50% { box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2); transform: translatey(-20px); } 100% { box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6); transform: translatey(0px); } } .content { width: 100%; max-width: 600px; padding: 20px 40px; box-sizing: border-box; text-align: center; } h1 { font-size: 24px; margin: 10px 0 0 0; font-weight: lighter; text-transform: uppercase; color: #eeeeee; }

Related: See More


Questions / Comments: