Skip to content

Instantly share code, notes, and snippets.

@snatchev
Created July 16, 2014 04:07
Show Gist options
  • Save snatchev/8faca663f3a3a4efcac4 to your computer and use it in GitHub Desktop.
Save snatchev/8faca663f3a3a4efcac4 to your computer and use it in GitHub Desktop.
iphone in CSS with ZeroPush push notification
.ios7 {
-webkit-font-smoothing: antialiased;
font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue UltraLight', 'Helvetica Neue', Arial;
background: #3F505E;
padding-top: 20px;
font-weight: 300;
line-height: normal;
position: relative;
::selection {
background: transparent;
}
::-moz-selection {
background: transparent;
}
.notifs {
position: absolute;
width: 256px;
box-sizing: border-box;
z-index: 2;
margin: 2px;
background: rgba(0, 0, 0, 0);
opacity: .8;
height: 0;
/*transition: all .5s;*/
overflow: hidden;
}
.notifs.active {
height: 454.40000000000003px;
padding: 15px 0;
background: rgba(0, 0, 0, 0.4);
}
.notifs .choice {
margin: 5px;
border: 1px solid #696C71;
border-radius: 3px;
}
.notifs .choice a {
border-left: 1px solid #696C71;
padding: 5px;
font-size: 15px;
text-align: center;
box-sizing: border-box;
width: 81px;
display: inline-block;
color: #f2f2f2;
text-decoration: none;
font-family: 'Helvetica Neue', Arial;
font-weight: 300;
}
.notifs .choice a:first-child {
border: 0;
}
.notifs .choice a.active {
color: #000;
background: #696C71;
}
.notifs #fb.active,
.notifs #twitter.active {
height: 0;
overflow: hidden;
}
.notif {
position: relative;
color: #FFF;
/*transition: all.5s;*/
}
.notif.first {
border-top: 1px solid rgba(255,255,255,0.5);
margin-top: 10px;
}
.notif .title {
background: rgba(0, 0, 0, 0.4);
padding: 2px 0;
}
.notif .title i,
.notif .title h2,
.notif .title span {
display: inline-block;
vertical-align: middle;
}
.notif .title i {
color: #FFF;
background: #32CCFE;
border-radius: 3px;
padding: 3px 4px;
margin: 0 10px;
min-width: 23px;
min-height: 23px;
box-sizing: border-box;
text-align: center;
}
.notif .title i.icon-facebook {
background: #3B5998;
}
.notif .title h2 {
margin: 0;
font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue UltraLight', 'Helvetica Neue', Arial;
font-weight: 100;
color: #b3b3b3;
}
.notif .title span {
float: right;
margin: 5px 10px;
border-radius: 100%;
background: #666666;
width: 20px;
height: 20px;
text-align: center;
line-height: 16px;
color: #000;
font-weight: bold;
cursor: pointer;
/*transition: all .5s;*/
}
.notif .title span:hover {
color: #4d4d4d;
background: #b3b3b3;
}
.notif .desc {
margin-left: 43px;
border-bottom: 1px solid #696C71;
padding: 10px 0;
}
.notif .desc:last-child {
border-bottom: 0;
}
.notif .desc h3 {
text-transform: none;
line-height: normal;
font-weight: bold;
font-size: 15px;
display: inline-block;
margin: 0;
margin-bottom: 3px;
}
.notif .desc span {
font-size: 12px;
margin-left: 5px;
font-family: 'Helvetica Neue', Arial;
}
.notif .desc p, .notif .desc small {
margin: 0;
margin-bottom: 2px;
font-family: 'Helvetica Neue', Arial;
}
.notif .desc small, .notif .desc span {
opacity: 0.4;
font-weight: 400;
}
.iphone .notif img {
width: 16px;
margin-left: -24px;
margin-right: 4px;
}
.toolbar {
position: absolute;
z-index: 9;
width: 256px;
color: #FFF;
padding: 2px 5px;
box-sizing: border-box;
opacity: .9;
font-size: 13px;
font-weight: 600;
}
.toolbar i {
font-size: 9px;
}
.toolbar i.icon-rss {
font-size: 15px;
}
.toolbar span.right {
float: right;
font-size: 13px;
}
.toolbar div.battery {
height: 8px;
width: 20px;
display: inline-block;
border: 1px solid #FFF;
position: relative;
padding: 1px;
}
.toolbar div.battery .bar {
background: #4AD462;
height: 8px;
}
.toolbar div.battery:after {
content: "";
height: 4px;
width: 2px;
display: block;
background: #FFF;
position: absolute;
right: -3px;
top: 2px;
}
.screen {
width: 256px;
height: 454.40000000000003px;
margin: 2px;
top: 0;
color: #FFF;
position: relative;
background: #40759d;
background: linear-gradient(to bottom, #40759d 0%, #6fa2b8 19%, #6fa2b8 30%, #7788c0 59%, #6b7ebf 73%, #244279 100%);
/*transition: all .5s;*/
}
.screen.active {
-webkit-filter: blur(8px);
}
.screen i[class*="icon-chevron"] {
position: absolute;
width: 256px;
text-align: center;
opacity: .2;
font-size: 30px;
}
.screen i.icon-chevron-up {
bottom: 5px;
}
.screen .time {
font-size: 83px;
text-align: center;
padding-top: 40px;
}
.screen .date {
font-size: 18px;
text-align: center;
font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Arial;
margin-bottom: 10px;
}
.screen .unlock {
position: absolute;
bottom: 40px;
text-align: center;
width: 256px;
font-size: 23px;
opacity: .5;
transition: opacity .5s;
cursor: pointer;
font-family: 'Helvetica Neue', 'Helvetica', Arial;
}
.screen .unlock:hover {
opacity: .8;
}
.screen .photo {
position: absolute;
bottom: 0px;
right: 5px;
font-size: 25px;
opacity: .5;
transition: opacity .5s;
cursor: pointer;
z-index: 2;
}
.screen .photo:hover {
opacity: .8;
}
.ip {
margin: 0 auto;
width: 284.8px;
height: 557.75px;
overflow: hidden;
border-radius: 20px;
background: #FFF;
border: 3px solid #e6e6e6;
}
.ip:after {
content: "\2610";
text-align: center;
font-size: 32.5px;
color: #FFF;
line-height: 32px;
display: block;
padding-left: 1px;
background: #e6e6e6;
width: 36px;
height: 37px;
border-radius: 50%;
margin: 0 auto;
position: relative;
top: -43px;
box-shadow: inset 0 0 20px #FFF;
}
.iphone {
background: linear-gradient(to bottom, #40759d 0%, #6fa2b8 19%, #6fa2b8 30%, #7788c0 59%, #6b7ebf 73%, #244279 100%);
/*transition: all .5s;*/
width: 260px;
height: 458.20000000000005px;
margin: 0 auto;
border-width: 50px 10px;
border-color: #FFF;
border-style: solid;
overflow: hidden;
}
.iphone img {
width: 180%;
}
.chevron {
position: absolute;
width: 256px;
z-index: 9999;
cursor: pointer;
}
.chevron.bas {
bottom: -10px;
}
.fleche {
width: 34px;
height: 10px;
margin: 20px auto;
position: relative;
opacity: .1;
transition: opacity .5s;
}
.fleche:hover {
opacity: .3;
}
.fleche:before,
.fleche:after {
content: "";
display: block;
width: 18px;
height: 6px;
border-radius: 5px;
-webkit-transform: rotate(-20deg);
-webkit-transform-origin: top right;
transform: rotate(-20deg);
transform-origin: top right;
background: #FFF;
box-shadow: 0 0 3px #FFF;
}
.fleche:after {
-webkit-transform: rotate(20deg);
-webkit-transform-origin: top left;
position: absolute;
top: 0;
left: 16px;
}
.fleche.up {
width: 31px;
top: -7px;
}
.fleche.up:before {
transform: rotate(20deg);
}
.fleche.up:after {
transform: rotate(-20deg);
left: 12px;
}
}
.span6.ios7
.ip
.iphone
.toolbar
<i class="icon-circle"></i><i class="icon-circle"></i><i class="icon-circle"></i><i class="icon-circle-blank"></i><i class="icon-circle-blank"></i> <span>A&T</span> <i class="icon-rss"></i> <span class="right"><i class="icon-bell-alt"></i> 80 % <div class="battery"><div class="bar" style="width: 80%"></div></div></span>
.chevron.haut
.fleche.up
.screen
.time 23:13
.date Monday, June 10
.notifications.active
.notif.first
.desc
%i
%img(src='https://zeropush.com/favicon.png')
%h3 ZeroPush
%span now
%p Hello World
%small slide to view
.unlock slide to unlock
.photo
%i.icon-camera
.chevron.bas
.fleche
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment