Skip to content

Instantly share code, notes, and snippets.

@dziudek
Created September 6, 2012 19:01
Show Gist options
  • Save dziudek/3659508 to your computer and use it in GitHub Desktop.
Save dziudek/3659508 to your computer and use it in GitHub Desktop.
Responsive devices :)
/**
* Responsive devices :)
*/
#responsive {
animation-name: device;
animation-duration: 5s;
animation-iteration-count: infinite;
animation-direction: alternate;
background: #fff;
border: 5px solid #333;
border-bottom: 17px solid #333;
border-radius: 5px;
border-top: 10px solid #333;
height: 90px;
margin: 20px auto;
position: relative;
width: 60px;
}
#responsive > div {
animation-name: interface;
animation-duration: 5s;
animation-iteration-count: infinite;
animation-direction: alternate;
background: #fff;
border-radius: 50%;
border-top: 0px solid #fff;
border-left: 0px solid #fff;
border-right: 0px solid #fff;
border-bottom: 0px solid #fff;
height: 9px;
left: 50%;
margin: 4px 0 0 -4px;
position: absolute;
top: 100%;
width: 9px;
}
@keyframes device {
from {
background: #fff;
border: 5px solid #333;
border-bottom: 17px solid #333;
border-radius: 5px;
border-top: 10px solid #333;
height: 90px;
margin: 20px auto;
position: relative;
width: 60px;
}
50% {
border: 10px solid #333;
border-bottom: 34px solid #333;
border-radius: 10px;
border-top: 20px solid #333;
height: 200px;
width: 160px;
}
to {
border: 10px solid #333;
border-bottom: 12px solid #333;
border-radius: 10px;
border-top: 12px solid #333;
height: 140px;
width: 240px;
}
}
@keyframes interface {
from {
background: #fff;
border-radius: 50%;
border-top: 0px solid #fff;
border-left: 0px solid #fff;
border-right: 0px solid #fff;
border-bottom: 0px solid #fff;
height: 9px;
left: 50%;
margin: 4px 0 0 -4px;
position: absolute;
top: 100%;
width: 9px;
}
50% {
background: #fff;
border-top: 0px solid #fff;
border-left: 0px solid #fff;
border-right: 0px solid #fff;
border-bottom: 0px solid #fff;
border-radius: 50%;
height: 18px;
left: 50%;
margin: 8px 0 0 -9px;
width: 18px;
}
to {
background: #333;
border-radius: 0;
border-top: 0px solid #fff;
border-left: 50px solid #fff;
border-right: 50px solid #fff;
border-bottom: 10px solid #333;
height: 30px;
left: 50%;
margin: 12px 0 0 -65px;
width: 30px;
}
}
<div id="responsive"><div></div></div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment