Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save immortalsantee/8330201 to your computer and use it in GitHub Desktop.
Save immortalsantee/8330201 to your computer and use it in GitHub Desktop.
A Pen by santosh maharjan.
<iphone>
<input type="checkbox"/>
<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" />
</content>
</iphone>
/* THIS IS IF YOU ARE TESTING IT ON TOUCHDEVICES */
window.addEventListener('load', function(){
new FastClick(document.body);
}, false);
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;
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:20px;
left:5px;
background:red;
content:"";
display:block;
position:absolute;
background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1319/nav-icon-off_2.svg);
background-size:25px;
transition:.4s;
backface-visibility:hidden;
}
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(.95) translateX(257px) translateY(10px);
}
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 0 10px 10px;
font-size:15px;
color:#666;
}
@media all and (max-width:362px) {
iphone {
margin:0 auto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment