cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <iphone>
  <input type="checkbox" checked/>
  <navigation>
    <a href="">HOME</a>
    <a href="">ARCHIVE</a>
    <a href="">ARTICLES</a>
    <a href="">FEATURED</a>
    <a href="">PROFILE</a>
    <a href="">WRITE</a>
  </navigation>
  <content>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <title>Minimal Mobile Markup</title>
    <cap>by Joacim Nilsson</cap>
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
    <img src="http://tiny.cc/2p6d9w" alt="" width="320" height="200" />
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  </content>
</iphone>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Roboto:100);

html, body {
  min-height:100%;
  background: #51283d; /* Old browsers */
background: -moz-linear-gradient(-45deg,  #51283d 0%, #2f2c48 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#51283d), color-stop(100%,#2f2c48)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(-45deg,  #51283d 0%,#2f2c48 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(-45deg,  #51283d 0%,#2f2c48 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(-45deg,  #51283d 0%,#2f2c48 100%); /* IE10+ */
background: linear-gradient(135deg,  #51283d 0%,#2f2c48 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#51283d', endColorstr='#2f2c48',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

iphone, content {
  width:320px;
  height:568px;
}

iphone {
  margin:30px auto;
  font-family:'HelveticaNeue-Light', Roboto;
  position:relative;
  display:block;
  overflow:hidden;
  backface-visibility:hidden;
  box-shadow:0 2px 8px #222;
}

input[type="checkbox"] {
  width:0;
  height:0;
  margin:0;
  position:absolute;
  cursor:pointer;
  z-index:3;
  top:-15px;
}

input[type="checkbox"]:after {
  width:25px;
  height:25px;
  top:23px;
  left:8px;
  background:red;
  content:"";
  display:block;
  position:absolute;
  background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1319/nav-icon-off.png);
  background-size:25px;
  transition:.4s;
  backface-visibility:hidden;
  background-repeat:no-repeat;
}

navigation {
  z-index:1;
  height:568px;
  display:block;
  background: #a95674; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover,  #a95674 0%, #87446a 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#a95674), color-stop(100%,#87446a)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover,  #a95674 0%,#87446a 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover,  #a95674 0%,#87446a 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover,  #a95674 0%,#87446a 100%); /* IE10+ */
background: radial-gradient(ellipse at center,  #a95674 0%,#87446a 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a95674', endColorstr='#87446a',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */

  padding:90px 0 0 80px;
}

navigation a {
  display:block;
  color:#fff;
  text-shadow:0 0 1px #51293D;
  text-decoration:none;
  font-size:16px;
  width:0;
  margin-bottom:40px;
  transition:.3s;
  transform:scale(.9);
  line-height:14px;
}

navigation a:before {
  content:"";
  width:7px;
  height:7px;
  border-radius:4px;
  background:#fff;
  display:block;
  position:absolute;
  transform:translateX(-20px) translateY(3px) scale(.7);
  box-shadow:0 0 0 #fff;
  transition:.3s;
}

navigation a:hover:before {
  transform:translateX(-20px) translateY(3px) scale(1);
  box-shadow:0 0 5px #fff;
}

navigation a:hover {
  transform:scale(1);
}

content {
  display:block;
  background:#FFFFFF;
  position:absolute;
  z-index:2;
  top:0;
  transition:.4s;
  box-shadow:0 0 30px #444;
  overflow:hidden;
  overflow-y:scroll;
  padding-right:15px;
}

input[type="checkbox"]:checked ~ content
{
  transform:scale(.95) translateX(250px);
}

input[type="checkbox"]:checked:after {
  transform:scale(.9) translateX(270px) translateY(13px);
}

title {
  display:block;
  width:320px;
  text-align:center;
  margin:10px 0;
  font-size:22px;
}

cap {
  text-align:center;
  display:block;
  font-size:12px;
  font-style:italic;
}

content p {
  padding:10px 10px 10px 10px;
  font-size:15px;
  color:#666;
}


@media all and (max-width:362px) {
  iphone {
    margin:0 auto;
  }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console