"card img"
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/SaraSoueidan/pen/zsgit?q=portfolio&limit=all&order=popularity&depth=everything&show_forks=false" /> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css'><script src='https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js'></script> <style class="cp-pen-styles">/* Demo for my blog post: https://blog.sarasoueidan.com/horizontal-portfolio-layout Also available on Github: https://github.com/SaraSoueidan/horizontal-portfolio-layout */ @import url(https://fonts.googleapis.com/css?family=Lato:300,100,400); * { margin: 0; padding: 0; border: 0; box-sizing: border-box; position: relative; list-style-type: none } a { color: inherit; text-decoration: none } a.link { color: #C4290D } html, body { min-height: 100% } body { background: #eee url('https://subtlepatterns.com/patterns/pw_pattern.png'); font: 300 20px/1.5 "Lato", sans-serif; color: #333 } header { background-color: white; padding: 0 30px; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); z-index: 10; line-height: 2em } header a { font-size: 20px } .demo-wrapper { padding: 30px } h1 { font-size: 42px; margin: 0; font-weight: 300; margin-bottom: 30px; letter-spacing: -1px; text-align: center } .portfolio-items { height: 400px; overflow-x: scroll; overflow-y: hidden; white-space: nowrap; margin-bottom: 30px; position: relative } .portfolio-items > li { display: inline-block; vertical-align: top } .item { width: 300px; height: 202px; margin: 150px 20px 0; padding: 5px; border-radius: 2px; background-color: white; font-size: 14px; opacity: 0; position: relative; top: -300px; box-shadow: 0px 10px 10px -5px rgba(0,0,0,0.5); -webkit-transform: rotate(-135deg); -ms-transform: rotate(-135deg); -o-transform: rotate(-135deg); transform: rotate(-135deg); -webkit-transition: all .3s ease, opacity 2s ease, top 1s ease; -o-transition: all .3s ease, opacity 2s ease, top 1s ease; transition: all .3s ease, opacity 2s ease, top 1s ease } .item:nth-child(even) { margin-top: 100px } .item:hover { height: 270px; padding: 15px; -webkit-transform: translateY(-68px); -ms-transform: translateY(-68px); -o-transform: translateY(-68px); transform: translateY(-68px) } .item:hover .date { -webkit-transform: translate3d(0, 61px, 0); -ms-transform: translate3d(0, 61px, 0); -o-transform: translate3d(0, 61px, 0); transform: translate3d(0, 61px, 0) } .item:hover figcaption { -webkit-animation: show .25s ease-in .120s forwards; -o-animation: show .25s ease-in .120s forwards; animation: show .25s ease-in .120s forwards } .item:hover p:nth-of-type(1) span { -webkit-animation: slideOut .25s ease-out .15s forwards; -o-animation: slideOut .25s ease-out .15s forwards; animation: slideOut .25s ease-out .15s forwards } .item:hover p:nth-of-type(2) span { -webkit-animation: slideOut .2s ease-out .3s forwards; -o-animation: slideOut .2s ease-out .3s forwards; animation: slideOut .2s ease-out .3s forwards } .item:hover .view { height: 170px } .item:hover .view img { top: -20px; left: -20px; } .falldown { top: 0; opacity: 1; -webkit-transform: rotate(0); -ms-transform: rotate(0); -o-transform: rotate(0); transform: rotate(0) } figure { width: 100%; height: 100%; margin: 0; padding: 0; } .view { overflow: hidden; width: 100%; height: 190px; position: relative } .view img { width: 300px; height: 190px; -webkit-transition: width .3s ease; -o-transition: width .3s ease; transition: width .3s ease; position: absolute; } figcaption { height: 60px; width: 100%; padding: 0; position: absolute; bottom: 0; overflow: hidden; opacity: 0 } figcaption p { line-height: 25px !important; font: bold 12px/18px "Arial", sans-serif; text-transform: uppercase; padding: 0 10px; margin: 5px 0; width: 100%; background-color: #f0f0f0; color: #333 } figcaption span { left: -100%; opacity: 0 } figcaption a { color: #CC320F } .date { z-index: 1; width: 50px; height: 30px; line-height: 30px; color: #fff; font-weight: bold; text-align: center; border-radius: 1px; background-color: #CC320F; position: absolute; bottom: 30px; left: 15px; -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.12, 1.6, 0.91, 0.92); -o-transition: -o-transform 0.5s cubic-bezier(0.12, 1.6, 0.91, 0.92); transition: -webkit-transform 0.5s cubic-bezier(0.12, 1.6, 0.91, 0.92); transition: -ms-transform 0.5s cubic-bezier(0.12, 1.6, 0.91, 0.92); transition: -o-transform 0.5s cubic-bezier(0.12, 1.6, 0.91, 0.92); transition: transform 0.5s cubic-bezier(0.12, 1.6, 0.91, 0.92) } @keyframes slideOut { 0% { left: -100%; opacity: 0 } 95% { left: 0; opacity: 0.2 } 100% { opacity: 1; left: 0 } } @keyframes show { to { opacity: 1 } } ::-webkit-scrollbar { width: 7px; height: 7px; cursor: pointer } ::-webkit-scrollbar-track { background-color: #ddd; border-radius: 10px } ::-webkit-scrollbar-thumb { border-radius: 10px; background-color: #C4290D } @-webkit-keyframes slideOut { 0% { left: -100%; opacity: 0 } 95% { left: 0; opacity: 0.2 } 100% { opacity: 1; left: 0 } } @-o-keyframes slideOut { 0% { left: -100%; opacity: 0 } 95% { left: 0; opacity: 0.2 } 100% { opacity: 1; left: 0 } } @-webkit-keyframes show { to { opacity: 1 } } @-o-keyframes show { to { opacity: 1 } } </style></head><body> <header> <a href="https://blog.sarasoueidan.com/horizontal-portfolio-layout">Read Tutorial</a> </header> <div class="demo-wrapper"> <!-- <h1>Horizontal Portfolio Layout With CSS3 Animations and jQuery</h1> --> <ul class="portfolio-items"> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/1.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?thetwoandthebubbles">The Two and The Bubbles</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2005</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/2.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?christmas_ice_skating">Christmas Ice Skating</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2008</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/3.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?love_knows_no_boundaries">Love Knows No Boundaries</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2008</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/7.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?sandal">Sandal</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2009</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/13.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?skiing">Skiing</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2004</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/33.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?knight_lady">The Knight and The Lady</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2009</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/11.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?friends_c2">Friends</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2008</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/10.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?coiffure">Coiffure</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2004</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/12.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?pc_mac">Get a Mac</a></span></p> <p><span>By Vlad Gerasimov</span></p> </figcaption> </figure> <div class="date">2007</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/15.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?connection">Connection</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2006</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/16.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?alice_dragon_tree">Alice, Her Dragon, and The Christmas Tree</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2011</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/18.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?inseparable">Inseparable</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2009</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/5.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?pregnant">Pregnant</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2006</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/6.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?xmas_tree">Christmas Tree</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2009</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/8.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?thetwoandthemouse">The Two and The Mouse</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2005</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/9.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?punctuation">Punctuation</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2006</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/4.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?internet_cafe">Internet Cafe</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2012</div> </li> <li class="item"> <figure> <div class="view"> <img src="https://s.cdpn.io/9674/21.jpg" /> </div> <figcaption> <p><span><a href="http://www.vladstudio.com/wallpaper/?raring_ringtail_blue">Raring Ringtail</a></span></p> <p><span>By Vlad Gerasimov </span></p> </figcaption> </figure> <div class="date">2013</div> </li> </ul> </div> <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 src='https://raw.github.com/brandonaaron/jquery-mousewheel/master/jquery.mousewheel.js'></script> <script >//checks if element it is called on is visible (only checks horizontally (function($) { var $window = $(window); $.fn.isVisible = function(){ var $this = $(this), Left = $this.offset().left, visibleWidth = $window .width(); return Left < visibleWidth; } })(jQuery); (function($){ var list = $('.portfolio-items'), showVisibleItems = function(){ list.children('.item:not(.falldown)').each(function(el, i){ var $this = $(this); if($this.isVisible()){ $this.addClass('falldown'); } }); }; //initially show all visible items before any scroll starts showVisibleItems(); //then on scroll check for visible items and show them list.scroll(function(){ showVisibleItems(); }); //image hover pan effect list.on('mousemove','img', function(ev){ var $this = $(this), posX = ev.pageX, posY = ev.pageY, data = $this.data('cache'); //cache necessary variables if(!data){ data = {}; data.marginTop = - parseInt($this.css('top')), data.marginLeft = - parseInt($this.css('left')), data.parent = $this.parent('.view'), $this.data('cache', data); } var originX = data.parent.offset().left, originY = data.parent.offset().top; //move image $this.css({ 'left': -( posX - originX ) / data.marginLeft, 'top' : -( posY - originY ) / data.marginTop }); }); list.on('mouseleave','.item', function(e){ $(this).find('img').css({ 'left': '0', 'top' : '0' }); }); list.mousewheel(function(event, delta) { this.scrollLeft -= (delta * 60); event.preventDefault(); }); })(jQuery); /* Thanks a lot Fabrice Weinberg for helping me organize and oprimize the JS code :) Copyright © 2013 Sara Soueidan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //# sourceURL=pen.js </script> </body></html>

Related: See More

Questions / Comments: