"tab"
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/Oka/pen/hAenu?depth=everything&order=popularity&page=18&q=tab&show_forks=false" /> <style class="cp-pen-styles">@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400|Dosis:200,300,400); *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html, body { margin: 0; padding: 0; width: 100%; height: 100%; background-color: #fafafa; -webkit-background-size: cover; background-size: cover; } .wrap { margin: auto; padding: 0; display: block; position: absolute; width: 100%; height: 100%; top: 0; right: 0; bottom: 0; left: 0; background: #fafafa; overflow: hidden; -webkit-transition: all 0.4s; -moz-transition: all 0.4s; -ms-transition: all 0.4s; -o-transition: all 0.4s; transition: all 0.4s; } .tabs { margin: 0; padding: 0; display: block; width: 100%; height: 100%; float: left; background: #111; } .tab-height, .button { height: 125px; line-height: 125px; } .tab { display: none; } .button { margin: 0; padding: 0; display: block; position: relative; width: 160px; text-align: center; color: #f0f0f0; cursor: pointer; -webkit-transition: all 0.4s; -moz-transition: all 0.4s; -ms-transition: all 0.4s; -o-transition: all 0.4s; transition: all 0.4s; } .button:hover { background: #ccc; color: #111; } .button:active { color: #ff58a5; } .display { margin: 0; padding: 0; display: none; position: absolute; top: 0; right: 0; width: calc(100% - 160px); height: 100%; background: #fafafa; overflow: hidden; } .title { margin: 30px 0; padding: 0; display: block; position: relative; width: 100%; height: 30px; font-family: 'Open Sans'; font-weight: 300; font-size: 1.5em; line-height: 30px; text-align: center; color: #111; -webkit-transition: all 0.4s; -moz-transition: all 0.4s; -ms-transition: all 0.4s; -o-transition: all 0.4s; transition: all 0.4s; } p { margin: 30px auto; padding: 0; display: block; position: relative; width: 90%; height: auto; font-family: 'Open Sans'; font-weight: 300; font-size: 1em; line-height: 20px; text-align: center; color: #111; } #tab--1:checked ~ #button--1, #tab--2:checked ~ #button--2, #tab--3:checked ~ #button--3, #tab--4:checked ~ #button--4 { background: #fafafa; color: #111; } #tab--1:checked ~ #display--1, #tab--2:checked ~ #display--2, #tab--3:checked ~ #display--3, #tab--4:checked ~ #display--4 { display: block; } </style></head><body> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/> <div class="wrap"> <div class="tabs"> <input class="tab" type="radio" name="tabs" checked="checked" id="tab--1"/> <input class="tab" type="radio" name="tabs" id="tab--2"/> <input class="tab" type="radio" name="tabs" id="tab--3"/> <input class="tab" type="radio" name="tabs" id="tab--4"/> <label class="button" for="tab--1" id="button--1"><i class="fa fa-home fa-2x"></i></label> <label class="button" for="tab--2" id="button--2"><i class="fa fa-bars fa-2x"></i></label> <label class="button" for="tab--3" id="button--3"><i class="fa fa-heart fa-2x"></i></label> <label class="button" for="tab--4" id="button--4"><i class="fa fa-bell fa-2x"></i></label> <div class="display" id="display--1"><span class="title">Pure CSS3 Tabbed Content</span> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur dolor quo, dicta perspiciatis amet, quod delectus inventore, nobis officia explicabo quidem ipsum corporis voluptatibus repellat id earum eaque! Magnam iusto asperiores adipisci suscipit ad praesentium dicta, perspiciatis earum in mollitia repellendus ullam possimus et minima iure reprehenderit aliquid, odit eaque doloribus blanditiis molestiae dolorum. Error, dolores quasi, impedit tempora quia saepe eum ab illum nobis facilis sapiente, temporibus officiis fugit.</p> </div> <div class="display" id="display--2"> <span class="title">No JavaScript Needed</span> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex soluta dolorum porro maiores id ipsum eos excepturi perferendis similique nihil quasi tempora facilis, natus necessitatibus quam in sed enim repellat temporibus beatae assumenda velit veritatis. Adipisci ex vero corrupti est recusandae nihil minima autem odio dolor velit quam voluptatibus delectus, tempore quo odit placeat ipsa sit, veniam id ducimus exercitationem! Facere eius tempore voluptatem harum accusantium officiis quos officia, explicabo assumenda beatae mollitia molestias ad aut minima error ut, id omnis perferendis, nesciunt animi. Facere, recusandae, architecto, soluta et porro magnam repudiandae, aperiam harum accusamus saepe ad commodi explicabo labore!</p> </div> <div class="display" id="display--3"><span class="title">Ugly markup though...</span> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas ipsam eveniet dolor iste blanditiis sunt, accusamus cupiditate ratione voluptates tenetur minus facilis saepe laudantium quod dicta, optio illum nulla dignissimos soluta velit. Tempora, inventore. Nesciunt, quasi, iste. Dolorum amet porro, repellendus cumque. Delectus ut, saepe nobis quas minus numquam, culpa dolor dolorum nisi ducimus quam harum impedit architecto quasi sunt pariatur cum dolorem aut, aliquam mollitia voluptates deleniti animi. Delectus dignissimos, libero pariatur aliquid, necessitatibus vel obcaecati natus labore rerum.</p> </div> <div class="display" id="display--4"><span class="title">But it works!</span> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tenetur aperiam, esse ex ipsa? Quibusdam itaque dolor modi laudantium quod deleniti est provident incidunt? Voluptas animi aut, non id, ipsam voluptates.</p> </div> </div> </div> <script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> </body></html>

Related: See More


Questions / Comments: