"mobile"
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/chrisdothtml/pen/yydKjQ?depth=everything&order=popularity&page=7&q=mobile&show_forks=false" /> <link rel='stylesheet prefetch' href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'> <style class="cp-pen-styles">/* Reset */ @import url(//codepen.io/chrisdothtml/pen/ojLzJK.css); .animate, .top-bar .icon { -webkit-transition: all 0.3s; transition: all 0.3s; } .animate-long, .device, .device .screen, .device .screen .fa-codepen { -webkit-transition: all 0.6s; transition: all 0.6s; } .absolute-center, .device, .device .screen .fa-codepen { margin: auto; position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .top-bar { background-color: #fff; width: 200px; height: 60px; line-height: 54px; margin-left: -100px; border: 0 solid rgba(0, 0, 0, 0.15); border-width: 2px 2px 4px 2px; position: absolute; top: 15px; left: 50%; z-index: 100; border-radius: 5px; } .top-bar .icon { width: 33.33333%; float: left; text-align: center; cursor: pointer; } .top-bar .icon .fa { color: #2980b9; vertical-align: middle; } .top-bar .icon .fa-mobile { font-size: 30px; } .top-bar .icon .fa-tablet { height: 26px; font-size: 28px; } .top-bar .icon .fa-desktop { height: 22px; font-size: 24px; } .top-bar .icon:not(:last-child) { border-right: 1px solid rgba(0, 0, 0, 0.1); } .top-bar .icon.current, .top-bar .icon:hover { background-color: rgba(0, 0, 0, 0.03); } .device { background-color: #fff; border-style: solid; border-color: rgba(0, 0, 0, 0.15); } .device .screen { background-color: rgba(0, 0, 0, 0.03); margin: auto; text-align: center; position: absolute; } .device .screen .fa-codepen { display: block; color: #161616; } .device.desktop { width: 100%; height: 100%; padding: 0; border-width: 0; border-radius: 0; } .device.desktop .screen { top: 0; bottom: 0; left: 0; right: 0; } .device.desktop .screen .fa-codepen { width: 90px; height: 90px; font-size: 90px; } .device.tablet { width: 600px; height: 700px; border-width: 1px; border-radius: 10px; } .device.tablet .screen { top: 30px; bottom: 30px; left: 30px; right: 30px; } .device.tablet .screen .fa-codepen { width: 80px; height: 80px; font-size: 80px; } .device.mobile { width: 300px; height: 500px; border-width: 1px; border-radius: 10px; } .device.mobile .screen { top: 15px; bottom: 15px; left: 15px; right: 15px; } .device.mobile .screen .fa-codepen { width: 70px; height: 70px; font-size: 70px; } </style></head><body> <div class="top-bar"> <div class="icon current" id="mobile"><i class="fa fa-mobile"></i></div> <div class="icon" id="tablet"><i class="fa fa-tablet"></i></div> <div class="icon" id="desktop"><i class="fa fa-desktop"></i></div> </div> <div class="device mobile" id="device"> <div class="screen"> <div class="fa fa-codepen"></div> </div> </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 >(function() { $(document).ready(function() { return $('.icon').click(function() { $(this).addClass('current').siblings('.icon').removeClass('current'); return $('#device').removeClass('desktop').removeClass('tablet').removeClass('mobile').addClass($(this).attr('id')); }); }); }).call(this); //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: