"mobile shopping card"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/johnbgarcia/pen/PbWvJv?limit=all&page=9&q=shop" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css'> <style class="cp-pen-styles">*, *:before, *:after { box-sizing: border-box; margin: 0; padding: 0; } html { width: 100%; height: 100%; } html body { width: 100%; height: 100%; margin: 0; background: #42275a; background: -webkit-linear-gradient(to left, #42275a, #734b6d); background: -webkit-linear-gradient(right, #42275a, #734b6d); background: linear-gradient(to left, #42275a, #734b6d); font-family: "Roboto", sans-serif; } .mobile-container { position: absolute; left: 50%; top: 50%; margin-left: -180px; margin-top: -283.5px; width: 360px; height: 567px; border-radius: 5px; box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15); overflow: hidden; } .mobile-container .left { float: left; } .mobile-container .right { float: right; } .mobile-container .header { width: 100%; height: 50px; background: #431d65; border-bottom: 4px solid #b7b767; } .mobile-container .header .nav { padding: 0 10px; } .mobile-container .header .nav .fa { color: white; line-height: 50px; cursor: pointer; } .mobile-container .header .nav .cart { font-size: 22px; } .mobile-container .header .nav .back { font-size: 20px; } .mobile-container .jumbo-tron { width: 100%; position: relative; height: 250px; overflow: hidden; background: -webkit-radial-gradient(center, #734b6d, #42275a); background: radial-gradient(center, #734b6d, #42275a); } .mobile-container .jumbo-tron .jumbo-tron-product-title { position: absolute; bottom: 10px; left: 10px; font-weight: bold; color: white; font-size: 24px; text-shadow: 0px 0px 20px #431d65; } .mobile-container .jumbo-tron .image-close-up { width: 600px; height: 600px; display: block; background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/504262/Coffee%20Mug%20PSD%20Mockup.png); background-repeat: repeat; background-size: 180px; background-position: 45% 44%; background-blend-mode: multiply; opacity: 0.1; -webkit-transform: rotate(30deg) translateX(-118px); transform: rotate(30deg) translateX(-118px); } .mobile-container .jumbo-tron img { max-width: 200px; display: block; position: absolute; top: 50%; left: 50%; margin: -25% 0 0 -25%; } .product-details-wrapper { overflow: hidden; width: 100%; height: 207px; position: relative; margin: 0px auto; } .product-details-wrapper .product-details { background: #431d65; color: #FFF; font-family: "Roboto", sans-serif; -webkit-font-smoothing: antialiased; padding: 5px; width: 100%; height: 100%; overflow: auto; display: block; } .product-details-wrapper .product-details::-webkit-scrollbar { width: 0 !important; } .product-details-wrapper .product-details .product-description-section { background: rgba(255, 255, 255, 0.21); padding: 20px; border-bottom: 1px solid white; margin-bottom: 10px; position: relative; } .product-details-wrapper .product-details .product-description-section .pricing { margin-bottom: 5px; color: #dede7c; position: absolute; top: 10px; right: 10px; font-size: 20px; } .product-details-wrapper .product-details .product-description-section ul li { margin-left: 30px; } .product-details-wrapper .product-details .product-description-section-title { padding-bottom: 10px; } .footer { background: #613882; width: 100%; height: 60px; display: block; } .footer .save { padding: 20px; color: #fff; cursor: pointer; } .footer button { margin: 10px; padding: 10px 20px; border-radius: 30px; border: none; background: #dede7c; color: #613882; font-family: "Roboto", sans-serif; font-weight: bold; font-size: 16px; cursor: pointer; -webkit-transition: 0.2s; transition: 0.2s; } .footer button:focus { outline-width: 0; } .footer button:active { -webkit-transform: translateY(4px); transform: translateY(4px); } .drop-to-cart { -webkit-animation: image-drop-to-cart 2s forwards; animation: image-drop-to-cart 2s forwards; } @-webkit-keyframes image-drop-to-cart { 0% { -webkit-transform: translateY(0px); transform: translateY(0px); } 45% { -webkit-transform: translateY(400px); transform: translateY(400px); opacity: 1; } 46% { opacity: 0; } 70% { -webkit-transform: translateY(-200px); transform: translateY(-200px); opacity: 0; } 100% { -webkit-transform: translateY(0px); transform: translateY(0px); opacity: 1; } } @keyframes image-drop-to-cart { 0% { -webkit-transform: translateY(0px); transform: translateY(0px); } 45% { -webkit-transform: translateY(400px); transform: translateY(400px); opacity: 1; } 46% { opacity: 0; } 70% { -webkit-transform: translateY(-200px); transform: translateY(-200px); opacity: 0; } 100% { -webkit-transform: translateY(0px); transform: translateY(0px); opacity: 1; } } .pen-footer { position: absolute; bottom: 0; right: 0; padding: 10px; color: #fff; } .pen-footer a { text-decoration: none; color: #431d65; font-weight: bold; background: #dede7c; padding: 5px; margin-left: 10px; } </style></head><body> <div class="mobile-container"> <div class="header"> <div class="nav"> <div class="back left"><i class="fa fa-long-arrow-left"></i></div> <div class="cart right"><i class="fa fa-shopping-cart"></i></div> </div> </div> <div class="jumbo-tron"> <h1 class="jumbo-tron-product-title">CODE AND COFFEE MUG</h1> <div class="image-close-up"></div><img id="product-image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/504262/Coffee%20Mug%20PSD%20Mockup.png" alt="Main Product"/> </div> <div class="product-details-wrapper"> <div class="product-details"> <div class="overview product-description-section"> <h3 class="product-description-section-title">Overview</h3> <p class="pricing">$15.00</p> <p>The perfect way to inject yourself with sweet caffine. </p> </div> <div class="overview product-description-section"> <ul> <h3 class="product-description-section-title">Details</h3> <li>100% grass fed ceramic.</li> <li>Locally sourced ink.</li> <li>Holds about 16oz of liquid.</li> <li>For use only with hipster coffee that no one has heard of before.</li> </ul> </div> </div> </div> <div class="footer"> <div class="save left">Add To Wishlist <i class="fa fa-star"></i></div> <button class="right" id="add-to-cart">Add to Cart</button> </div> </div> <div class="pen-footer"> <p>@johngarcia9110 <a class="viewPens" href="https://codepen.io/johnbgarcia/" target="blank">view other pens</a></p> </div> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script> <script > var addToCartButton = document.getElementById('add-to-cart'); var productImage = document.getElementById('product-image'); addToCartButton.addEventListener('click', function(event){ addClassToElement( productImage, 'drop-to-cart' ); removeElementClassTimer( productImage, 'drop-to-cart', 2000 ); }); var addClassToElement = function( targetElement, classToAdd ){ targetElement.classList.add(classToAdd); } var removeElementClassTimer = function( targetElement, classToRemove, delay ){ setTimeout(function(){ targetElement.classList.remove(classToRemove); }, delay); } //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: