一款纯css3实现的tab选项卡的实列教程
程序员文章站
2022-03-04 10:15:02
css3怎么做tab选项卡?下面费大家分享一款纯css3实现的tab选项卡的实列教程,单击左侧的选项的时候,右侧内容以动画的形式展示。下文有具体代码,想学的朋友可以进来参考一下... 14-12-11...
今天给大家带来一款纯css3实现的tab选项卡。单击左侧的选项的时候,右侧内容以动画的形式展示。效果图如下:
实现的代码。
html代码:
xml/html code复制内容到剪贴板
- <div class="night-tabs night-tabs-color-default night-tabs-animation-slide-right night-tabs-position-vleft">
- <!--tab 1-->
- <input type="radio" name="night-tabs" checked="" id="tab1" class="content1">
- <!--checked= tab shown-->
- <label for="tab1">
- <!--modify icon and name-->
- <span><span><em class="fa fa-home"></em>night tabs</span></span>
- </label>
- <!--tab 2-->
- <input type="radio" name="night-tabs" id="tab2" class="content2">
- <label for="tab2">
- <!--modify icon and name-->
- <span><span><em class="fa fa-font"></em>typography</span></span>
- </label>
- <!--tab 3-->
- <input type="radio" name="night-tabs" id="tab3" class="content3">
- <label for="tab3">
- <!--modify icon and name-->
- <span><span><em class="fa fa-list"></em>grid systen</span></span>
- </label>
- <!--tab 4-->
- <input type="radio" name="night-tabs" id="tab4" class="content4">
- <label for="tab4">
- <!--modify icon and name-->
- <span><span><em class="fa fa-legal"></em>license</span></span>
- </label>
- <!--content-->
- <ul class="night-tabs-content">
- <!--tab 1-->
- <li class="content1">
- <div class="content-1-content">
- <!--content goes here-->
- <h1 class="h1">
- night tabs</h1>
- <p>
- <span class="dropcap">n</span>ight tabs (formerly truetabs) is an extensive css3
- tabbed content snippet. it started out small as a typical css tabs snippet, but
- i have expanded it greatly. it offers many features, and can be easily modified
- to fit your needs. some of the features include: cross browser support, preset animations,
- colors, and layouts, a responsive grid system, and a typography set, among other
- things.</p>
- </div>
- </li>
- <!--tab 2-->
- <li class="content2">
- <div class="content-2-content">
- <!--content goes here-->
- <h1 class="h1">
- custom fonts</h1>
- <h2 class="h2">
- open sans light</h2>
- <h3 class="h3">
- <em class="fa fa-check"></em>fontawesome</h3>
- <p>
- <h2 class="h2">
- paragraphs and quotes</h2>
- <blockquote class="blockquote">
- maecenas tincidunt nunc est, nec pharetra odio porta ac. morbi cursus lacinia neque,
- tristique tincidunt ipsum tincidunt a.
- </blockquote>
- <div class="well">
- <p>
- maecenas tincidunt nunc est, nec pharetra odio porta ac. morbi cursus lacinia neque,
- tristique tincidunt ipsum tincidunt a.</p>
- </div>
- <p>
- lorem ipsum dolor sit amet, consectetur adipiscing elit. donec malesuada rutrum
- felis, quis imperdiet nisl finibus id. etiam commodo vitae purus a lobortis. donec
- lacinia dapibus metus nec feugiat. integer blandit tellus vel dapibus efficitur.
- nulla placerat sollicitudin laoreet. maecenas fermentum eros diam, at blandit lectus
- volutpat ac.proin ornare mauris dui, semper condimentum urna blandit non. vestibulum
- ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; ut
- scelerisque justo sit amet sem commodo, ac porta arcu auctor.</p>
- <h3 class="h3">
- unordered lists</h3>
- <ul class="night-tabs-unordered-list">
- <li>lorem ipsum dolor sit amet, consectetur adipiscing elit.
- <ul class="night-tabs-unordered-list">
- <li>nulla vitae lacus sed dui fringilla elementum eu id eros.</li>
- <li>vivamus euismod mauris sit amet iaculis porttitor.</li>
- <li>donec condimentum massa non elit lobortis, a ultrices ante vulputate.</li>
- </ul>
- </li>
- <li>nulla vitae lacus sed dui fringilla elementum eu id eros.</li>
- <li>vivamus euismod mauris sit amet iaculis porttitor.</li>
- <li>donec condimentum massa non elit lobortis, a ultrices ante vulputate.</li>
- </ul>
- <h3 class="h3">
- ordered lists</h3>
- <ol class="night-tabs-ordered-list">
- <li>lorem ipsum dolor sit amet, consectetur adipiscing elit.
- <ol class="night-tabs-ordered-list">
- <li>nulla vitae lacus sed dui fringilla elementum eu id eros.</li>
- <li>vivamus euismod mauris sit amet iaculis porttitor.</li>
- <li>donec condimentum massa non elit lobortis, a ultrices ante vulputate.</li>
- </ol>
- </li>
- <li>nulla vitae lacus sed dui fringilla elementum eu id eros.</li>
- <li>vivamus euismod mauris sit amet iaculis porttitor.</li>
- <li>donec condimentum massa non elit lobortis, a ultrices ante vulputate.</li>
- </ol>
- <div class="text-right">
- <em>typography set</em>
- </div>
- </div>
- </li>
- <!--tab 3-->
- <li class="content3">
- <div class="content-3-content">
- <!--content goes here-->
- <div class="grid-row">
- <div class="grid-column grid-column-6">
- <h2 class="h2">
- html5</h2>
- <p>
- lorem ipsum dolor sit amet, consectetur adipiscing elit. aliquam ante nisl, condimentum
- nec dolor viverra, dignissim convallis est. in commodo rhoncus augue, a euismod
- felis placerat ut. ut ullamcorper libero tortor, ut semper lectus congue ut. morbi
- pulvinar, nisi at pharetra scelerisque, nibh magna ornare augue, vel aliquet ipsum
- ante eu sem. maecenas id est risus. nulla facilisis dui molestie euismod mollis.
- duis vehicula elementum justo in porta. maecenas erat lectus, finibus vel lectus
- non, consequat ultricies dolor. nunc ultricies quam in purus facilisis, porttitor
- blandit odio volutpat. sed sed posuere lectus, sit amet rutrum est. duis porttitor
- purus blandit, lacinia nibh quis, ultricies augue.</p>
- </div>
- <div class="grid-column grid-column-6">
- <h2 class="h2">
- css3</h2>
- <p>
- lorem ipsum dolor sit amet, consectetur adipiscing elit. aliquam ante nisl, condimentum
- nec dolor viverra, dignissim convallis est. in commodo rhoncus augue, a euismod
- felis placerat ut. ut ullamcorper libero tortor, ut semper lectus congue ut. morbi
- pulvinar, nisi at pharetra scelerisque, nibh magna ornare augue, vel aliquet ipsum
- ante eu sem. maecenas id est risus. nulla facilisis dui molestie euismod mollis.
- duis vehicula elementum justo in porta. maecenas erat lectus, finibus vel lectus
- non, consequat ultricies dolor. nunc ultricies quam in purus facilisis, porttitor
- blandit odio volutpat. sed sed posuere lectus, sit amet rutrum est. duis porttitor
- purus blandit, lacinia nibh quis, ultricies augue.</p>
- </div>
- </div>
- <div class="grid-row">
- <div class="grid-column grid-column-12">
- <h2 class="h2">
- no javascript</h2>
- <p>
- lorem ipsum dolor sit amet, consectetur adipiscing elit. aliquam ante nisl, condimentum
- nec dolor viverra, dignissim convallis est. in commodo rhoncus augue, a euismod
- felis placerat ut. ut ullamcorper libero tortor, ut semper lectus congue ut. morbi
- pulvinar, nisi at pharetra scelerisque, nibh magna ornare augue, vel aliquet ipsum
- ante eu sem. maecenas id est risus. nulla facilisis dui molestie euismod mollis.
- duis vehicula elementum justo in porta. maecenas erat lectus, finibus vel lectus
- non, consequat ultricies dolor. nunc ultricies quam in purus facilisis, porttitor
- blandit odio volutpat. sed sed posuere lectus, sit amet rutrum est. duis porttitor
- purus blandit, lacinia nibh quis, ultricies augue.</p>
- </div>
- <div class="text-right">
- <em>night tabs - css3 tabbed content</em>
- </div>
- </div>
- </div>
- </li>
- <!--tab 4-->
- <li class="content4">
- <div class="content-4-content">
- <!--content goes here-->
- <h1 class="h1">
- night tabs - v0.2.0</h1>
- <p>
- coded by jason shi under the mit license.</p>
- </div>
- </li>
- </ul>
- </div>
css3代码:
css code复制内容到剪贴板
- /*------------------------------------*\
- #reset
- \*------------------------------------*/
- .night-tabs a,
- .night-tabs div,
- .night-tabs em,
- .night-tabs img,
- .night-tabs ul,
- .night-tabs label,
- .night-tabs li,
- .night-tabs ol,
- .night-tabs p,
- .night-tabs span,
- .night-tabs ul {
- /* ->>> structure <<<-*/
- border: 0;
- margin: 0;
- padding: 0;
- position: relative;
- box-sizing: border-box /* css3 */
- }
- /*------------------------------------*\
- #tab labels
- \*------------------------------------*/
- .night-tabs {
- /* ->>> structure <<<-*/
- margin: 0 auto; /* center night tabs; optional. */
- width: 70%; /* define width. */
- font: 300 0px/1.5
- "open sans", "helvetica neue", helvetica, arial, sans-serif; /* typography */
- color: #ecf0f1 /* colors */
- }
- .night-tabs input {display: none} /* hide checkbox. */
- .night-tabs input:checked+label {cursor: default} /* set cursor type. */
- .night-tabs label {
- /* ->>> structure <<<-*/
- display: inline-block;
- z-index: 1;
- border-bottom: 2px solid #353535;
- border-right: 1px solid #444;
- border-left: 1px solid #222;
- /* ->>> typography <<<-*/
- cursor: pointer;
- font-size: 18px;
- line-height: 40px;
- text-align: left;
- /* ->>> css3 <<<-*/
- -webkit-user-select: none; /* ->>> prevents double-click selection. <<<-*/
- -moz-user-select: none;
- -ms-user-select: none
- }
- .night-tabs label span {
- display: block;
- padding: .2em;
- background: #404040
- }
- .night-tabs label span span {
- /* structure */
- border: 2px solid transparent;
- padding: 0 1em;
- /* css3*/
- -webkit-transition: background .4s;
- transition: background .4s
- }
- /*------------------------------------*\
- #tab content
- \*------------------------------------*/
- .night-tabs .night-tabs-content {
- display: block; /* structure */
- font-size: 18px /* typography */
- }
- .night-tabs .night-tabs-content > li {
- /* structure */
- left: 0;
- opacity: 0;
- overflow: auto;
- padding: 1em 1.5em; /* ->>> spacing for content. <<<-*/
- position: absolute;
- top: 0;
- visibility: hidden;
- width: 100%;
- background: #404040; /* colors */
- /* css3 */
- -webkit-transform-origin: 0 0;
- -ms-transform-origin: 0 0;
- transform-origin: 0 0;
- -webkit-transition: all .8s .1s; /* ->>> intensity of tab effects. <<<-*/
- transition: all .8s .1s
- }
- @charset "utf-8";
- /**
- * contents - effects.css
- *
- * general styles
- * setup for tab effects.
- *
- * slide effects
- * basic slide effects from different directions.
- *
- * advanced effects
- * advanced effects (scale, rotate, flip)
- *
- */
- /*------------------------------------*\
- #general styles
- \*------------------------------------*/
- .night-tabs>.content1:checked~ul>.content1,
- .night-tabs>.content2:checked~ul>.content2,
- .night-tabs>.content3:checked~ul>.content3,
- .night-tabs>.content4:checked~ul>.content4 {
- /* structure */
- opacity: 1;
- visibility: visible;
- /* css3 */
- -webkit-transform: none;
- -ms-transform: none;
- transform: none
- }
- /*------------------------------------*\
- #slide effects
- \*------------------------------------*/
- /* ->>> slide up <<<-*/
- .night-tabs-animation-slide-up .night-tabs-content > li {
- -webkit-transform: translatey(30px);
- -ms-transform: translatey(30px);
- transform: translatey(30px)
- }
- /* ->>> slide down <<<-*/
- .night-tabs-slide-down .night-tabs-content > li {
- -webkit-transform: translatey(-30px);
- -ms-transform: translatey(-30px);
- transform: translatey(-30px)
- }
- /* ->>> slide left <<<-*/
- .night-tabs-animation-slide-left .night-tabs-content > li {
- -webkit-transform: translatex(-30px);
- -ms-transform: translatex(-30px);
- transform: translatex(-30px)
- }
- /* ->>> slide right <<<-*/
- .night-tabs-animation-slide-rightright .night-tabs-content > li {
- -webkit-transform: translatex(30px);
- -ms-transform: translatex(30px);
- transform: translatex(30px)
- }
- /* ->>> slide up + left <<<-*/
- .night-tabs-slide-up-left .night-tabs-content > li {
- -webkit-transform: translate(-30px, -30px);
- -ms-transform: translate(-30px, -30px);
- transform: translate(-30px, -30px)
- }
- /* ->>> slide up + right <<<-*/
- .night-tabs-animation-slide-up-rightright .night-tabs-content > li {
- -webkit-transform: translate(30px, -30px);
- -ms-transform: translate(30px, -30px);
- transform: translate(30px, -30px)
- }
- /* ->>> slide down + left <<<-*/
- .night-tabs-animation-slide-down-left .night-tabs-content > li {
- -webkit-transform: translate(-30px, 30px);
- -ms-transform: translate(-30px, 30px);
- transform: translate(-30px, 30px)
- }
- /* ->>> slide down + right <<<-*/
- .night-tabs-animation-slide-down-rightright .night-tabs-content > li {
- -webkit-transform: translate(30px, 30px);
- -ms-transform: translate(30px, 30px);
- transform: translate(30px, 30px)
- }
- /*------------------------------------*\
- #slide effects
- \*------------------------------------*/
- /* ->>> rotate <<<-*/
- .night-tabs-rotate > ul > li {
- -o-transform: rotate(10deg);
- -ms-transform: rotate(10deg);
- -moz-transform: rotate(10deg);
- -webkit-transform: rotate(10deg)
- }
- .night-tabs-animation-rotate.night-tabs.night-tabs-position-vleft > ul > li,
- .night-tabs-animation-rotate.night-tabs.night-tabs-position-vright > ul > li {
- -o-transform: rotate(-10deg);
- -ms-transform: rotate(-10deg);
- -moz-transform: rotate(-10deg);
- -webkit-transform: rotate(-10deg)
- }
- /* ->>> scale <<<-*/
- .night-tabs-animation-scale > ul > li {
- -webkit-transform: scale(0.6, 0.6);
- -ms-transform: scale(0.6, 0.6);
- transform: scale(0.6, 0.6)
- }
- /* ->>> flip <<<-*/
- .night-tabs-animation-flip .night-tabs-content {
- -webkit-perspective: 2000px;
- perspective: 2000px;
- -webkit-perspective-origin: 50% 50%;
- perspective-origin: 50% 50%
- }
- .night-tabs-animation-flip .night-tabs-content > li {
- -webkit-transform: rotatex(-90deg);
- transform: rotatex(-90deg)
- }
- .night-tabs-animation-flip.night-tabs-position-vleft > .night-tabs-content > li {
- -webkit-transform: rotatey(90deg);
- transform: rotatey(90deg)
- }
- .night-tabs-animation-flip.night-tabs-position-vright > .night-tabs-content > li {
- -webkit-transform: rotatey(-90deg);
- transform: rotatey(-90deg)
- }
- /**
- * contents - layouts.css
- *
- * horizontal positions
- * basic horizontal positions: top, left, right, and justify.
- *
- * vertical positions
- * basic vertical positions, vertical left and vertical right.
- *
- */
- /*------------------------------------*\
- #horizontal positions
- \*------------------------------------*/
- /* ->>> left, center, right <<<-*/
- .night-tabs-position-left label,
- .night-tabs-position-center label,
- .night-tabs-position-rightright label {width: auto}
- .night-tabs-position-left {text-align: left}
- .night-tabs-position-center {text-align: center}
- .night-tabs-position-rightright {text-align: rightright}
- /* ->>> justified <<<-*/
- .night-tabs-position-justify > input:first-child + label {padding-left: 0}
- .night-tabs-position-justify2 > label {width: 50%}
- .night-tabs-position-justify3 > label {width: 33.33%}
- .night-tabs-position-justify4 > label {width: 25%}
- /*------------------------------------*\
- #vertical positions
- \*------------------------------------*/
- /* ->>> general styles <<<-*/
- .night-tabs-position-vleft .night-tabs-content > li,
- .night-tabs-position-vright .night-tabs-content > li {border-top: 0}
- .night-tabs-position-vleft > label,
- .night-tabs-position-vright > label {
- clear: left;
- display: block;
- float: left;
- margin-right: 0;
- width: 25%
- }
- /* ->>> vertical left <<<-*/
- .night-tabs-position-vleft label {border-right: 2px solid #333}
- .night-tabs-position-vleft > .night-tabs-content {margin-left: 25%}
- /* ->>> vertical right <<<-*/
- .night-tabs-position-vright > label {
- clear: rightright;
- float: rightright
- }
- .night-tabs-position-vright ul li { border-right: 1px solid #333}
- .night-tabs-position-vright > .night-tabs-content {margin-right: 25%}
- .night-tabs-position-vright .night-tabs-content > li {
- -webkit-transform-origin: 100% 0%;
- -ms-transform-origin: 100% 0%;
- transform-origin: 100% 0%
- }
- /**
- * contents - typography.css
- *
- * basic typography
- * styles for headings,paragraphs, and links.
- *
- * extended typography
- * styling for images, unordered and ordered lists, and utility classes.
- *
- * grid system
- * basic 12 fluid column grid system with offset support.
- *
- */
- /*------------------------------------*\
- #basic typography
- \*------------------------------------*/
- /* ->>> headings <<<-*/
- h1, h2, h3 { margin: 0; padding: 0 }
- .night-tabs .night-tabs-content li .h1,
- .night-tabs .night-tabs-content li .h2,
- .night-tabs .night-tabs-content li .h3 {
- font-weight: 300;
- line-height: 1.5
- }
- .night-tabs .night-tabs-content li .h1 {font-size: 3em}
- .night-tabs .night-tabs-content li .h2 {font-size: 2.2em}
- .night-tabs .night-tabs-content li .h3 {font-size: 1.4em}
- /* ->>> paragraphs <<<-*/
- .night-tabs .night-tabs-content li p {
- margin: .5em 0;
- font-size: 1em
- }
- /* ->>> links <<<-*/
- .night-tabs .night-tabs-content li a {color: #ecf0f1}
- .night-tabs .night-tabs-content li a:hover,
- .night-tabs .night-tabs-content li a:focus {text-decoration: none}
- /* ->>> fontawesome <<<-*/
- .night-tabs .fa { margin-right: .5em }
- /*------------------------------------*\
- #extended typography
- \*------------------------------------*/
- /* ->>> images <<<-*/
- .night-tabs .night-tabs-content li img {
- max-width: 100%;
- height: auto
- }
- /* ->>> lists <<<-*/
- .night-tabs .night-tabs-ordered-list,
- .night-tabs .night-tabs-unordered-list {
- margin-top: .3em;
- padding-left: 2.5em
- }
- .night-tabs .night-tabs-ordered-list {list-style: decimal}
- .night-tabs .night-tabs-unordered-list { list-style: disc}
- /* ->>> utility <<<-*/
- /* positioning */
- .text-center {text-align: center}
- .text-left {text-align: left}
- .text-rightright {text-align: rightright}
- .pull-left {float: left}
- .pull-rightright {float: rightright}
- /* preformatted */
- .dropcap {
- font-family: "sanchez", rockwell, slab-serif;
- float: left;
- font-size: 5em;
- line-height: .9;
- }
- .blockquote {
- margin: 1em;
- padding: 0 0 0 1em;
- border-left: 3px solid #ecf0f1
- }
- .well {
- background: #555;
- padding: 1em!important
- }
- /*------------------------------------*\
- #grid system
- \*------------------------------------*/
- /* ->>> micro-clearfix <<<-*/
- .night-tabs .grid-row:after {
- content: '';
- display: table;
- clear: both
- }
- /* ->>> basic structure <<<-*/
- .night-tabs .grid-row {margin-top: 1em}
- .night-tabs .grid-row:first-child {margin-top: 0}
- .night-tabs .grid-column {
- display: block;
- float: left;
- width: 100%;
- margin-left: 2%
- }
- .night-tabs .grid-column:first-child { margin-left: 0}
- /* ->>> grid system config <<<-*/
- .night-tabs .grid-column-1 {width: 6.5%}
- .night-tabs .grid-column-2 {width: 15%}
- .night-tabs .grid-column-3 {width: 23.5%}
- .night-tabs .grid-column-4 {width: 32%}
- .night-tabs .grid-column-5 {width: 40.5%}
- .night-tabs .grid-column-6 {width: 49%}
- .night-tabs .grid-column-7 {width: 57.5%}
- .night-tabs .grid-column-8 {width: 66%}
- .night-tabs .grid-column-9 {width: 74.5%}
- .night-tabs .grid-column-10 {width: 83%}
- .night-tabs .grid-column-11 {width: 91.5%}
- .night-tabs .grid-column-offset-1,
- .night-tabs .grid-column-offset-1:first-child{margin-left:8.5%}
- .night-tabs .grid-column-offset-2,
- .night-tabs .grid-column-offset-2:first-child{margin-left:17%}
- .night-tabs .grid-column-offset-3,
- .night-tabs .grid-column-offset-3:first-child{margin-left:25.5%}
- .night-tabs .grid-column-offset-4,
- .night-tabs .grid-column-offset-4:first-child{margin-left:34%}
- .night-tabs .grid-column-offset-5,
- .night-tabs .grid-column-offset-5:first-child{margin-left:42.5%}
- .night-tabs .grid-column-offset-6,
- .night-tabs .grid-column-offset-6:first-child{margin-left:51%}
- .night-tabs .grid-column-offset-7,
- .night-tabs .grid-column-offset-7:first-child{margin-left:59.5%}
- .night-tabs .grid-column-offset-8,
- .night-tabs .grid-column-offset-8:first-child{margin-left:68%}
- .night-tabs .grid-column-offset-9,
- .night-tabs .grid-column-offset-9:first-child{margin-left:76.5%}
- .night-tabs .grid-column-offset-10,.night-tabs .grid-column-offset-10:first-child{margin-left:85%}
- .night-tabs .grid-column-offset-11,.night-tabs .grid-column-offset-11:first-child{margin-left:93.5%}
- /**
- * contents - colors.css
- *
- * colors
- * default (gray/grey), red, blue, green, purple, orange, yellow, pink, brown, teal, turquoise.
- *
- */
- /*------------------------------------*\
- #colors
- \*------------------------------------*/
- /* ->>> default (gray/grey) <<<-*/
- .night-tabs label:hover span span,
- .night-tabs input:checked+label span span,
- .night-tabs-color-default label:hover span span,
- .night-tabs-color-default input:checked+label span span{background: #6c7a89}
- /* ->>> blue <<<-*/
- .night-tabs-color-blue label:hover span span,
- .night-tabs-color-blue input:checked+label span span {background: #1e8bc3}
- /* ->>> red <<<-*/
- .night-tabs-color-red label:hover span span,
- .night-tabs-color-red input:checked+label span span {background: #ef4836}
- /* ->>> green <<<-*/
- .night-tabs-color-green label:hover span span,
- .night-tabs-color-green input:checked+label span span {background: #27ae60}
- /* ->>> purple <<<-*/
- .night-tabs-color-purple label:hover span span,
- .night-tabs-color-purple input:checked+label span span {background: #9b59b6}
- /* ->>> orange <<<-*/
- .night-tabs-color-orange label:hover span span,
- .night-tabs-color-orange input:checked+label span span {background: #f9690e}
- /* ->>> yellow <<<-*/
- .night-tabs-color-yellow label:hover span span,
- .night-tabs-color-yellow input:checked+label span span {background: #a8880a}
- /* ->>> pink <<<-*/
- .night-tabs-color-pink label:hover span span,
- .night-tabs-color-pink input:checked+label span span {background: #db0a5b}
- /* ->>> brown <<<-*/
- .night-tabs-color-brown label:hover span span,
- .night-tabs-color-brown input:checked+label span span {background: #926239}
- /* ->>> teal <<<-*/
- .night-tabs-color-teal label:hover span span,
- .night-tabs-color-teal input:checked+label span span {background: #008080}
- /* ->>> turquoise <<<-*/
- .night-tabs-color-turquoise label:hover span span,
- .night-tabs-color-turquoise input:checked+label span span {background: #16a085}
- /**
- * contents - mobile.css
- *
- * responsive stacking
- * tabs stack on top of each other on mobile devices.
- *
- */
- /*------------------------------------*\
- #responsive stacking
- \*------------------------------------*/
- @media screen and (max-width: 48em) {
- .night-tabs .grid-column,
- .night-tabs .grid-column:first-child {
- float: none;
- width: 100%;
- margin: 1em 0 0 0
- }
- .night-tabs > label {
- display: block;
- float: none;
- width: 100%;
- padding-right: 0;
- padding-left: 0;
- text-align: left;
- margin: 0
- }
- .night-tabs > .night-tabs-content {
- margin-top: 0;
- margin-right: 0;
- margin-left: 0
- }
- .night-tabs > .night-tabs-content > li {
- -webkit-transform-origin: 50% 0%;
- -ms-transform-origin: 50% 0%;
- transform-origin: 50% 0%
- }
- .night-tabs.night-tabs-animation-flip > ul > li {
- -webkit-transform: rotatex(-90deg);
- transform: rotatex(-90deg)
- }
- }
- body {
- background: #111;
- margin-top: 2em
- }