Created
July 27, 2012 00:33
-
-
Save pixbit/3185425 to your computer and use it in GitHub Desktop.
TANK ALL THE THING!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>TANK ALL THE THING ! · CodePen</title> | |
<!-- | |
Copyright (c) 2012 Hugo Giraudel, http://codepen.io/HugoGiraudel | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
The above copyright notice and this permission notice shall be | |
included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
--> | |
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css"> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
html { | |
height: 100%; | |
} | |
body { | |
background: #bcf6f7; | |
background: linear-gradient(#bcf6f7, #77f0f4); | |
position: relative; | |
height: 100%; | |
overflow: hidden; | |
padding-top: 70px; | |
} | |
.floor { | |
width: 100%; | |
bottom: 0; | |
background: #764133; | |
background: linear-gradient(#81493c, #63392d); | |
height: 200px; | |
border-top: 3px solid black; | |
display: block; | |
} | |
.wrapper { | |
width: 270px; | |
animation: move 10s linear infinite; | |
position: relative; | |
left: 0; | |
top: 5px; | |
} | |
.top { | |
background: #86875f; | |
border: 3px solid black; | |
border-bottom: none; | |
width: 140px; | |
height: 60px; | |
border-radius: 30px 100px 0 0; | |
margin-left: 45px; | |
position: relative; | |
box-shadow: inset 20px -8px 0 #5d6239; | |
} | |
.middle { | |
width: 200px; | |
height: 40px; | |
background: #86875f; | |
border: 3px solid black; | |
border-radius: 10px 30px 0 0; | |
box-shadow: inset 15px -8px 0 #5d6239; | |
border-bottom: none; | |
margin-left: 35px; | |
} | |
.explosion { | |
position: absolute; | |
top: -40px; | |
right: -70px; | |
z-index: -2; | |
border-radius: 50%; | |
width: 80px; | |
height: 60px; | |
background-color: #f7ff00; | |
background-image: repeating-radial-gradient(75% 25%, circle cover, #f7ff00, #ffc526 33%, #991212); | |
border: 3px solid black; | |
box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.5); | |
animation: shoot 2s linear infinite; | |
transform: rotate(-20deg) scale(0); | |
opacity: 0; | |
} | |
.top:after { | |
content: ""; | |
background: #86875f; | |
border: 3px solid black; | |
height: 20px; | |
width: 150px; | |
position: absolute; | |
transform: rotate(-15deg); | |
right: -80px; | |
top: 10px; | |
z-index: -1; | |
box-shadow: inset 0 -8px 0 3px #5d6239; | |
} | |
.top:before { | |
content: ""; | |
position: absolute; | |
transform: rotate(-15deg); | |
height: 30px; | |
width: 15px; | |
border: 3px solid black; | |
border-radius: 8px; | |
background: #86875f; | |
right: -95px; | |
top: -18px; | |
box-shadow: inset 5px -6px 0 #5d6239; | |
} | |
.bottom { | |
background: #322d27; | |
height: 100px; | |
width: 270px; | |
border-radius: 100px 100px 150px 150px; | |
border: 3px solid black; | |
padding: 8px; | |
box-shadow: inset 10px -10px 0 #161211; | |
} | |
.wheels:after { | |
content: ""; | |
clear: both; | |
display: table; | |
} | |
.wheels { | |
background: #47443d; | |
border-radius: inherit; | |
list-style: none; | |
border: 3px solid black; | |
width: 100%; | |
height: 100%; | |
box-shadow: inset 0 8px 3px rgba(0, 0, 0, 0.5); | |
} | |
.wheels li { | |
float: left; | |
width: 50px; | |
height: 50px; | |
border: 3px solid black; | |
border-radius: 50%; | |
background: #959ca2; | |
box-shadow: inset 10px -10px 0 #72757a; | |
margin: 4px; | |
position: relative; | |
} | |
.wheels li:nth-child(2), | |
.wheels li:nth-child(3) { | |
margin-top: 20px; | |
} | |
.wheels li:after { | |
background: #424439; | |
border: 3px solid black; | |
width: 14px; | |
height: 14px; | |
border-radius: 50%; | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
content: ""; | |
margin-left: -10px; | |
margin-top: -10px; | |
box-shadow: inset 0 3px 1px rgba(0, 0, 0, 0.5); | |
} | |
.star { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
margin-left: -30px; | |
margin-top: -10px; | |
display: block; | |
color: white; | |
width: 0px; | |
height: 0px; | |
border-right: 20px solid transparent; | |
border-bottom: 14px solid white; | |
border-left: 20px solid transparent; | |
transform: rotate(35deg); | |
} | |
.star:before { | |
border-bottom: 16px solid white; | |
border-left: 6px solid transparent; | |
border-right: 6px solid transparent; | |
position: absolute; | |
height: 0; | |
width: 0; | |
top: -10px; | |
left: -12px; | |
display: block; | |
content: ''; | |
transform: rotate(-35deg); | |
} | |
.star:after { | |
position: absolute; | |
display: block; | |
color: red; | |
top: 0px; | |
left: -21px; | |
width: 0px; | |
height: 0px; | |
border-right: 20px solid transparent; | |
border-bottom: 14px solid white; | |
border-left: 20px solid transparent; | |
transform: rotate(-70deg); | |
content: ''; | |
} | |
@-moz-keyframes move { | |
from { | |
left: -300px; | |
} | |
to { | |
left: 2000px; | |
} | |
} | |
@-webkit-keyframes move { | |
from { | |
left: -300px; | |
} | |
to { | |
left: 2000px; | |
} | |
} | |
@-moz-keyframes shoot { | |
0%, 11%, 100% { | |
opacity: 0; | |
} | |
20% { | |
transform: rotate(-20deg) scale(1); | |
opacity: 1; | |
} | |
} | |
@-webkit-keyframes shoot { | |
0%, 11%, 100% { | |
opacity: 0; | |
transform: rotate(-20deg) scale(0); | |
} | |
10% { | |
transform: rotate(-20deg) scale(1); | |
opacity: 1; | |
} | |
} | |
</style> | |
<style> | |
#codepen-footer, #codepen-footer * { | |
-webkit-box-sizing: border-box !important; | |
-moz-box-sizing: border-box !important; | |
box-sizing: border-box !important; | |
} | |
#codepen-footer { | |
display: block !important; | |
position: fixed !important; | |
bottom: 0 !important; | |
left: 0 !important; | |
width: 100% !important; | |
padding: 0 10px !important; | |
margin: 0 !important; | |
height: 30px !important; | |
line-height: 30px !important; | |
font-size: 12px !important; | |
color: #eeeeee !important; | |
background-color: #505050 !important; | |
text-align: left !important; | |
background: -webkit-linear-gradient(top, #505050, #383838) !important; | |
background: -moz-linear-gradient(top, #505050, #383838) !important; | |
background: -ms-linear-gradient(top, #505050, #383838) !important; | |
background: -o-linear-gradient(top, #505050, #383838) !important; | |
border-top: 1px solid black !important; | |
border-bottom: 1px solid black !important; | |
border-radius: 0 !important; | |
border-image: none !important; | |
box-shadow: inset 0 1px 0 #6e6e6e, 0 2px 2px rgba(0, 0, 0, 0.4) !important; | |
z-index: 300 !important; | |
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif !important; | |
letter-spacing: 0 !important; | |
word-spacing: normal !important; | |
word-spacing: 0 !important; | |
-webkit-transform: none !important; | |
-moz-transform: none !important; | |
-ms-transform: none !important; | |
-o-transform: none !important; | |
transform: none !important; | |
} | |
#codepen-footer a { | |
color: #a7a7a7 !important; | |
text-decoration: none !important; | |
text-shadow: none !important; | |
border: 0 !important; | |
} | |
#codepen-footer a:hover { | |
color: white !important; | |
} | |
</style> | |
<script> | |
// Kill alerts, confirmations and prompts | |
// window.alert = function(){}; we're going to allow alerts for now | |
window.confirm = function(){}; | |
window.prompt = function(){}; | |
window.open = function(){}; | |
window.print = function(){}; | |
</script> | |
<script src="http://codepen.io/javascripts/libs/prefixfree.min.js"></script> | |
</head> | |
<body> | |
<div class="wrapper"> | |
<div class="top"> | |
<div class="star"></div> | |
</div> | |
<div class='explosion'></div> | |
<div class="middle"></div> | |
<div class="bottom"> | |
<ul class="wheels"> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
</ul> | |
</div> | |
</div> | |
<div class="floor"></div> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script src="http://codepen.io/javascripts/libs/modernizr.js"></script> | |
<div id="codepen-footer"> | |
<a style="color: #f73535 !important;" href="https://codepen.wufoo.com/forms/m7x3r3/def/field14=" onclick="window.open(this.href, null, 'height=517, width=680, toolbar=0, location=0, status=1, scrollbars=1, resizable=1'); return false">Report Abuse</a> | |
| |
<a href="/HugoGiraudel/pen/xoAvk" target="_blank">Edit this Pen</a> | |
</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="wrapper"> | |
<div class="top"> | |
<div class="star"></div> | |
</div> | |
<div class='explosion'></div> | |
<div class="middle"></div> | |
<div class="bottom"> | |
<ul class="wheels"> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
</ul> | |
</div> | |
</div> | |
<div class="floor"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass"; | |
* { box-sizing: border-box; } | |
html { | |
height:100%; | |
} | |
body { | |
background:#bcf6f7; | |
background:linear-gradient(#bcf6f7, #77f0f4); | |
position:relative; | |
height:100%; | |
overflow:hidden; | |
padding-top:70px; | |
} | |
.floor { | |
width:100%; | |
bottom:0; | |
background:#764133; | |
background:linear-gradient(#81493c, #63392d); | |
height:200px; | |
border-top:3px solid black; | |
display:block; | |
} | |
.wrapper { | |
width:270px; | |
animation: move 10s linear infinite; | |
position:relative; | |
left:0; | |
top:5px; | |
} | |
.top { | |
background:#86875f; | |
border:3px solid black; | |
border-bottom:none; | |
width:140px; | |
height:60px; | |
border-radius:30px 100px 0 0; | |
margin-left:45px; | |
position:relative; | |
box-shadow: inset 20px -8px 0 #5d6239; | |
} | |
.middle { | |
width:200px; | |
height:40px; | |
background:#86875f; | |
border:3px solid black; | |
border-radius:10px 30px 0 0; | |
box-shadow: inset 15px -8px 0 #5d6239; | |
border-bottom:none; | |
margin-left:35px; | |
} | |
.explosion { | |
position:absolute; | |
top:-40px; | |
right:-70px; | |
z-index:-2; | |
border-radius:50%; | |
width:80px; | |
height:60px; | |
background-color:#f7ff00; | |
background-image: repeating-radial-gradient(75% 25%, circle cover, #f7ff00, #ffc526 33%,#991212); | |
border:3px solid black; | |
box-shadow:0 0 20px 5px rgba(0,0,0,0.5); | |
animation:shoot 2s linear infinite; | |
transform:rotate(-20deg) scale(0); | |
opacity:0; | |
} | |
.top:after { | |
content:""; | |
background:#86875f; | |
border:3px solid black; | |
height:20px; | |
width:150px; | |
position:absolute; | |
transform:rotate(-15deg); | |
right:-80px; | |
top:10px; | |
z-index:-1; | |
box-shadow: inset 0 -8px 0 3px #5d6239; | |
} | |
.top:before { | |
content:""; | |
position:absolute; | |
transform:rotate(-15deg); | |
height:30px; | |
width:15px; | |
border:3px solid black; | |
border-radius:8px; | |
background:#86875f; | |
right:-95px; | |
top:-18px; | |
box-shadow: inset 5px -6px 0 #5d6239; | |
} | |
.bottom { | |
background:#322d27; | |
height:100px; | |
width:270px; | |
border-radius:100px 100px 150px 150px; | |
border:3px solid black; | |
padding:8px; | |
box-shadow: inset 10px -10px 0 #161211; | |
} | |
.wheels:after { | |
content:""; | |
clear:both; | |
display:table; | |
} | |
.wheels { | |
background:#47443d; | |
border-radius:inherit; | |
list-style:none; | |
border:3px solid black; | |
width:100%; | |
height:100%; | |
box-shadow:inset 0 8px 3px rgba(0,0,0,0.5); | |
} | |
.wheels li { | |
float:left; | |
width:50px; | |
height:50px; | |
border:3px solid black; | |
border-radius:50%; | |
background:#959ca2; | |
box-shadow: inset 10px -10px 0 #72757a; | |
margin:4px; | |
position:relative; | |
} | |
.wheels li:nth-child(2), | |
.wheels li:nth-child(3) { | |
margin-top:20px; | |
} | |
.wheels li:after { | |
background:#424439; | |
border:3px solid black; | |
width:14px; | |
height:14px; | |
border-radius:50%; | |
position:absolute; | |
left:50%; | |
top:50%; | |
content:""; | |
margin-left:-10px; | |
margin-top:-10px; | |
box-shadow:inset 0 3px 1px rgba(0,0,0,0.5); | |
} | |
.star { | |
position: absolute; | |
left:50%; | |
top:50%; | |
margin-left:-30px; | |
margin-top:-10px; | |
display: block; | |
color: white; | |
width: 0px; | |
height: 0px; | |
border-right: 20px solid transparent; | |
border-bottom: 14px solid white; | |
border-left: 20px solid transparent; | |
transform: rotate(35deg); | |
} | |
.star:before { | |
border-bottom: 16px solid white; | |
border-left: 6px solid transparent; | |
border-right: 6px solid transparent; | |
position: absolute; | |
height: 0; | |
width: 0; | |
top: -10px; | |
left: -12px; | |
display: block; | |
content: ''; | |
transform: rotate(-35deg); | |
} | |
.star:after { | |
position: absolute; | |
display: block; | |
color: red; | |
top: 0px; | |
left: -21px; | |
width: 0px; | |
height: 0px; | |
border-right: 20px solid transparent; | |
border-bottom: 14px solid white; | |
border-left: 20px solid transparent; | |
transform: rotate(-70deg); | |
content: ''; | |
} | |
@-moz-keyframes move { | |
from { left: -300px; } | |
to { left: 2000px; } | |
} | |
@-webkit-keyframes move { | |
from { left: -300px; } | |
to { left: 2000px; } | |
} | |
@-moz-keyframes shoot { | |
0%, 11%, 100% { opacity:0; } | |
20% { transform:rotate(-20deg) scale(1); opacity:1; } | |
} | |
@-webkit-keyframes shoot { | |
0%, 11%, 100% { opacity:0; transform:rotate(-20deg) scale(0); } | |
10% { transform:rotate(-20deg) scale(1); opacity:1; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment