Skip to content

Instantly share code, notes, and snippets.

Created June 26, 2012 01:27
Show Gist options
  • Select an option

  • Save anonymous/2992529 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/2992529 to your computer and use it in GitHub Desktop.
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Css firefly &middot; CodePen</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
<style>
body {
background: #e3dc10 url("noisepng.com/100-90-5.png");
font: 20px/20px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}
.all {
position: fixed;
top: 50%;
left: 50%;
margin-top: -10px;
margin-left: -139px;
}
.firefly {
width: 278px;
/* 307 */
height: 20px;
/* 64 */
background-image: linear-gradient(right, #34280e 25%, #0e9258 25%, #0e9258 50%, #c6972f 50%, #c6972f 75%, #0e9258 75%);
border-radius: 10px;
position: relative;
zoom: 70%;
}
.firefly .eyes {
width: 31px;
height: 31px;
background: linear-gradient(right, #34280e 50%, #0e9258 50%);
border-radius: 50%;
position: relative;
top: -21px;
left: -29px;
}
.firefly .eyes.left {
top: -23px;
}
.firefly .eyes.right {
top: -19px;
}
.firefly .wings {
position: absolute;
}
.firefly .wings.small {
border-left: 29px solid transparent;
border-right: 29px solid transparent;
}
.firefly .wings.small.one {
border-bottom: 111px solid rgba(255, 255, 255, 0.5);
border-radius: 0 0 50% 50%;
top: 19px;
transform-origin: center 0%;
transform: rotate(16deg);
animation: flyPlus 0.3s ease-in-out infinite;
}
.firefly .wings.small.two {
border-top: 111px solid rgba(255, 255, 255, 0.5);
border-radius: 50% 50% 0 0;
top: -111px;
transform-origin: center 100%;
transform: rotate(-16deg);
animation: flyMinus 0.3s ease-in-out infinite;
}
.firefly .wings.big {
transform-origin: center 0%;
border-left: 32px solid transparent;
border-right: 32px solid transparent;
}
.firefly .wings.big.one {
border-bottom: 137px solid #ffffff;
border-radius: 0 0 50% 50%;
top: 19px;
transform-origin: center 0%;
transform: rotate(-16deg);
animation: flyMinus 0.3s ease-in-out infinite;
}
.firefly .wings.big.two {
border-top: 137px solid #ffffff;
border-radius: 50% 50% 0 0;
top: -137px;
transform-origin: center 100%;
transform: rotate(16deg);
animation: flyPlus 0.3s ease-in-out infinite;
}
.firefly .feelers {
width: 96px;
height: 24px;
position: absolute;
left: -110px;
}
.firefly .feelers.left {
top: -25px;
border-bottom: 1px solid #0e9258;
border-left: 1px solid #0e9258;
border-radius: 0 20px;
}
.firefly .feelers.right {
top: 20px;
border: 1px solid #0e9258;
border-bottom: none;
border-right: none;
border-radius: 20px 0;
}
@keyframes flyMinus {
0% {
transform: rotate(-16deg);
}
50% {
transform: rotate(-36deg);
}
100% {
transform: rotate(-16deg);
}
}
@keyframes flyPlus {
0% {
transform: rotate(16deg);
}
50% {
transform: rotate(36deg);
}
100% {
transform: rotate(16deg);
}
}
</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;
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: 0 !important;
}
#codepen-footer a {
color: #a7a7a7 !important;
text-decoration: none !important;
}
#codepen-footer a:hover {
color: white !important;
}
</style>
<script>
// Kill alerts, confirmations and prompts
window.alert = function(){};
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="all">
<div class="firefly">
<div class="eyes left"></div>
<div class="eyes right"></div>
<div class="wings small one"></div>
<div class="wings big one"></div>
<div class="wings small two"></div>
<div class="wings big two"></div>
<div class="feelers left"></div>
<div class="feelers right"></div>
</div>
</div>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://codepen.io/javascripts/libs/modernizr.js"></script>
<script>
(function() {
/*
Found this http://www.studiobreakfast.be/images/banner-riveo.png and made a pure css edition out of it.
*/
})();
</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>
&nbsp;
<a href="/Mobilpadde/pen/firefly/1">Edit this Pen</a>
</div>
</body>
</html>
/*
Found this http://www.studiobreakfast.be/images/banner-riveo.png and made a pure css edition out of it.
*/
<div class="all">
<div class="firefly">
<div class="eyes left"></div>
<div class="eyes right"></div>
<div class="wings small one"></div>
<div class="wings big one"></div>
<div class="wings small two"></div>
<div class="wings big two"></div>
<div class="feelers left"></div>
<div class="feelers right"></div>
</div>
</div>
body{
background: #e3dc10 url("noisepng.com/100-90-5.png");
font: 20px/20px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}
.all{
position: fixed;
top: 50%;
left: 50%;
margin-top: -10px;
margin-left: -139px;
}
.firefly{
width: 278px; /* 307 */
height: 20px; /* 64 */
background-image: linear-gradient(right, #34280e 25%, #0e9258 25%, #0e9258 50%, #c6972f 50%, #c6972f 75%, #0e9258 75%);
border-radius: 10px;
position: relative;
zoom: 70%;
}
.firefly .eyes{
width: 31px;
height: 31px;
background: linear-gradient(right, #34280e 50%, #0e9258 50%);
border-radius: 50%;
position: relative;
top: -21px;
left: -29px;
}
.firefly .eyes.left{
top: -23px;
}
.firefly .eyes.right{
top: -19px;
}
.firefly .wings{
position: absolute;
}
.firefly .wings.small{
border-left: 29px solid transparent;
border-right: 29px solid transparent;
}
.firefly .wings.small.one{
border-bottom: 111px solid rgba(255, 255, 255, .5);
border-radius: 0 0 50% 50%;
top: 19px;
transform-origin: center 0%;
transform: rotate(16deg);
animation: flyPlus .3s ease-in-out infinite;
}
.firefly .wings.small.two{
border-top: 111px solid rgba(255, 255, 255, .5);
border-radius: 50% 50% 0 0;
top: -111px;
transform-origin: center 100%;
transform: rotate(-16deg);
animation: flyMinus .3s ease-in-out infinite;
}
.firefly .wings.big{
transform-origin: center 0%;
border-left: 32px solid transparent;
border-right: 32px solid transparent;
}
.firefly .wings.big.one{
border-bottom: 137px solid rgba(255, 255, 255, 1);
border-radius: 0 0 50% 50%;
top: 19px;
transform-origin: center 0%;
transform: rotate(-16deg);
animation: flyMinus .3s ease-in-out infinite;
}
.firefly .wings.big.two{
border-top: 137px solid rgba(255, 255, 255, 1);
border-radius: 50% 50% 0 0;
top: -137px;
transform-origin: center 100%;
transform: rotate(16deg);
animation: flyPlus .3s ease-in-out infinite;
}
.firefly .feelers{
width: 96px;
height: 24px;
position: absolute;
left: -110px;
}
.firefly .feelers.left{
top: -25px;
border-bottom: 1px solid #0e9258;
border-left: 1px solid #0e9258;
border-radius: 0 20px;
}
.firefly .feelers.right{
top: 20px;
border: 1px solid #0e9258;
border-bottom: none;
border-right: none;
border-radius: 20px 0;
}
@keyframes flyMinus{
0% { transform: rotate(-16deg); }
50% { transform: rotate(-36deg); }
100% { transform: rotate(-16deg); }
}
@keyframes flyPlus{
0% { transform: rotate(16deg); }
50% { transform: rotate(36deg); }
100% { transform: rotate(16deg); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment