Skip to content

Instantly share code, notes, and snippets.

@jordangray
Created August 14, 2012 15:39
Show Gist options
  • Save jordangray/3350354 to your computer and use it in GitHub Desktop.
Save jordangray/3350354 to your computer and use it in GitHub Desktop.
Flickery light
/* Flickery light */
@keyframes light {
0% {
background: hsla(57, 60%, 80%, 1);
box-shadow: 0 0 4px hsla(57, 60%, 99%, 1);
}
50% {
background: hsla(57, 60%, 99%, 1);
box-shadow: 0 0 30px hsla(57, 60%, 99%, 1),
0 0 20px hsla(57, 60%, 99%, 1);
}
100% {
background: hsla(57, 60%, 80%, 1);
box-shadow: 0 0 4px hsla(57, 60%, 99%, 1);
}
}
@keyframes floor {
0% {
opacity: .3;
}
50% {
opacity: 1;
}
100% {
opacity: .3;
}
}
html {
background: #000;
}
#light {
animation: light 3s infinite;
background: #fff;
height: 30px;
width: 30px;
border-radius: 50%;
position: relative;
left: 135px;
}
#floor {
animation: floor 3s infinite;
background: radial-gradient(hsla(57, 60%, 90%, .7) 10%, #000 70%);
height: 100px;
width: 300px;
border-radius: 50%;
position: relative;
top: 100px;
}
<div id="light"></div>
<div id="floor"></div>
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment