Skip to content

Instantly share code, notes, and snippets.

@Androguide
Last active August 29, 2015 14:04
Show Gist options
  • Save Androguide/583249b8961e0fd3fac5 to your computer and use it in GitHub Desktop.
Save Androguide/583249b8961e0fd3fac5 to your computer and use it in GitHub Desktop.
An Android mascot built with CSS
<!DOCTYPE html>
<html>
<head>
<title>CSS Bugdroid</title>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300' rel='stylesheet' type='text/css'>
<style type="text/css">
body {
padding: 40px;
background: #333;
color: #efefef;
}
h1 {
font-weight: 100;
font-family: Roboto, Helvetica, sans-serif;
}
#android {
width: 17em;
top: 10em;
display: inline-block;
position: relative;
}
#android div {
background: #1abc9c;
}
#head, #body {
display: block;
margin-left: auto;
margin-right: auto;
}
#head {
position: relative;
text-align: center;
color: #fff;
height: 6em;
width: 12em;
right: 0.25em;
border-radius: 12em 12em 0 0;
}
#head span {
position: relative;
top: -0.3em;
font-size: 6em;
letter-spacing: 0.1em;
}
#upper-body {
background: none !important;
}
#body {
display: inline-block;
margin-top: 5px;
color: #fff;
width: 12em;
height: 11em;
border-bottom-left-radius: 1em;
border-bottom-right-radius: 1em;
}
#left-arm, #right-arm {
display: inline-block;
border-radius: 1em;
height: 8.5em;
margin-bottom: 2.5em;
width: 2em;
}
#left-leg, #right-leg {
display: inline-block;
border-radius: 2em;
height: 7.5em;
width: 3em;
margin-top: -2em;
}
#right-leg {
float: right;
margin-right: 4em;
}
#left-leg {
margin-left: 4em;
}
#left-antenna {
height: 4.25em;
width: 0.5em;
margin-bottom: -4em;
margin-left: 3em;
border-radius: 1em;
-webkit-transform: rotate(-50deg);
-moz-transform: rotate(-50deg);
transform: rotate(-50deg);
}
#right-antenna {
height: 4.25em;
width: 0.5em;
margin-bottom: -4em;
margin-right: 3em;
border-radius: 1em;
float: right;
-webkit-transform: rotate(50deg);
-moz-transform: rotate(50deg);
transform: rotate(50deg);
}
#bubble {
display: inline-block;
padding: 3em;
background: #efefef;
width: 10em;
border-radius: 50%;
border-bottom-right-radius: 0;
color: #333;
text-align: center;
position: relative;
top: -13em;
}
</style>
</head>
<body>
<div id="bubble">
<h1>Hi, I'm Bugdroid!</h1>
</div>
<div id="android">
<div id="left-antenna"></div>
<div id="right-antenna"></div>
<div id="head">
<span>. .</span>
</div>
<div id="upper-body">
<div id="left-arm"></div>
<div id="body"></div>
<div id="right-arm"></div>
</div>
<div id="left-leg"></div>
<div id="right-leg"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment