Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sparks in Safari for iOS and OS X #3

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix sparks in Safari for iOS and OS X
  • Loading branch information
Eugene / Dae committed Apr 25, 2015
commit 765c6926156e91ea1066304f7d2d52b84681993f
45 changes: 44 additions & 1 deletion css/nyan-sparks.css
Original file line number Diff line number Diff line change
@@ -15,36 +15,79 @@
width: 40px;
height: 40px;
background-color: transparent;
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 0 0, 0 0, 0 0, 0 0;
background-position: 17px 17px, 17px 17px, 17px 17px, 17px 17px, 0 0, 0 0, 0 0, 0 0;
}

.spark:nth-child(1) {
top: 0;
left: 20px;

-webkit-animation: sparkly 700ms 0ms steps(1) infinite both;
animation: sparkly 700ms 0ms steps(1) infinite both;
}

.spark:nth-child(2) {
top: 40px;
left: 170px;

-webkit-animation: sparkly 700ms 200ms steps(1) infinite both;
animation: sparkly 700ms 200ms steps(1) infinite both;
}

.spark:nth-child(3) {
top: 100px;
left: 320px;

-webkit-animation: sparkly 700ms 400ms steps(1) infinite both;
animation: sparkly 700ms 400ms steps(1) infinite both;
}

.spark:nth-child(4) {
top: 150px;
left: 200px;

-webkit-animation: sparkly 700ms 600ms steps(1) infinite both;
animation: sparkly 700ms 600ms steps(1) infinite both;
}

@-webkit-keyframes sparkly {
0% {
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 0 0, 0 0, 0 0, 0 0;
background-position: 17px 17px, 17px 17px, 17px 17px, 17px 17px, 0 0, 0 0, 0 0, 0 0;
}

16% {
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 0 0, 0 0, 0 0, 0 0;
background-position: 17px 0, 34px 17px, 17px 34px, 0 17px, 0 0, 0 0, 0 0, 0 0;
}

33% {
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 5px 5px, 5px 5px, 5px 5px, 5px 5px;
background-position: 17px 0, 34px 17px, 17px 34px, 0 17px, 6px 6px, 29px 6px, 29px 29px, 6px 29px;
}

50% {
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 6px 11px, 6px 11px, 11px 6px, 11px 6px;
background-position: 17px 17px, 17px 17px, 17px 17px, 17px 17px, 17px 0, 17px 29px, 0 17px, 29px 17px;
}

66% {
background-size: 6px 11px, 6px 11px, 11px 6px, 11px 6px, 0 0, 0 0, 0 0, 0 0;
background-position: 17px 6px, 17px 23px, 6px 17px, 23px 17px, 0 0, 0 0, 0 0, 0 0;
}

83% {
background-size: 5px 6px, 5px 6px, 6px 5px, 6px 5px, 0 0, 0 0, 0 0, 0 0;
background-position: 17px 11px, 17px 22px, 11px 17px, 22px 17px, 0 0, 0 0, 0 0, 0 0;
}

100% {
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 0 0, 0 0, 0 0, 0 0;
background-position: 17px 17px, 17px 17px, 17px 17px, 17px 17px, 0 0, 0 0, 0 0, 0 0;
}
}

@keyframes sparkly {
0% {
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 0 0, 0 0, 0 0, 0 0;
@@ -80,4 +123,4 @@
background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px, 0 0, 0 0, 0 0, 0 0;
background-position: 17px 17px, 17px 17px, 17px 17px, 17px 17px, 0 0, 0 0, 0 0, 0 0;
}
}
}