"product 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 lang='en' 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/artyom-ivanov/pen/RWQRrV?depth=everything&order=popularity&page=4&q=product&show_forks=false" /> <style class="cp-pen-styles">@import url(//fonts.googleapis.com/css?family=Open+Sans); body { background: #E9F7FF; } .zoom { position: fixed; width: 100%; text-align: center; font-family: Open Sans, sans-serif; opacity: 0.3; color: #045888; font-size: 30px; top: 50%; transform: translateY(-50%); margin: 230px 0 0; } .product { width: 838px; position: absolute; left: 50%; top: 50%; padding: 20px; background: white; transform: translateX(-50%) translateY(-50%); } #thumb { width: 400px; border: 2px solid #e5e5e5; margin: 0 30px 0 0; float: left; cursor: crosshair; } .info { width: 404px; float: left; position: relative; font-family: 'Open Sans', sans-serif; } .info .full { width: 400px; height: 336px; float: left; position: absolute; overflow: hidden; left: 0; top: 0; opacity: 0; background: white; transition: .5s ease; } .info .full.active { opacity: 1; } .info .full img { position: absolute; } .anmedio { font-family: Arial, sans-serif; font-weight: bold; font-size: 14px; text-decoration: none; color: #E9F7FF; background: #0C1542; padding: 4px 5px 4px; position: fixed; bottom: 15px; left: 50%; transform: translateX(-50%); } </style></head><body> <div class="zoom"> Hover to image ;) </div> <div class="product"> <div id="thumb"> <img src="http://artem.anmedio.ru/dev/product/thumb.jpg" /> </div> <div class="info"> <h1>Microsoft Surface Book</h1> <div class="description"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> <div class="full"> <img src="http://artem.anmedio.ru/dev/product/full.jpg" /> </div> </div> </div> <a class="anmedio" href="http://anmedio.ru">ANMEDIO</a> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script >document.getElementById('thumb').onmousemove = function(e) { $(".full").addClass('active'); var x = e.offsetX == undefined ? e.layerX : e.offsetX; var y = e.offsetY == undefined ? e.layerY : e.offsetY; percentX = x/($("#thumb").width()/100); percentY = y/($("#thumb").height()/100); fullX = percentX * ($(".full img").width()/100) - $(".full").width()/2; fullY = percentY * ($(".full img").height()/100) - $(".full").height()/2; console.log(percentX+'% : '+percentY+'%'); console.log(fullX+'px : '+fullY+'px'); $(".full img").css('transform','translateX(-'+fullX+'px) translateY(-'+fullY+'px)'); } document.getElementById('thumb').onmouseout = function(){ $(".full").removeClass('active'); } //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: