Skip to content

Instantly share code, notes, and snippets.

@oboenikui
Last active January 30, 2016 18:59
Show Gist options
  • Save oboenikui/f148f2699b91a63c531c to your computer and use it in GitHub Desktop.
Save oboenikui/f148f2699b91a63c531c to your computer and use it in GitHub Desktop.
やばいSnippet
var style = document.createElement("style");
style.innerHTML =
[`
@keyframes blink {
75% { opacity: 0.0; }
}
@-webkit-keyframes blink {
75% { opacity: 0.0; }
}
body {
animation: blink 1s step-end infinite;
-webkit-animation: blink 1s step-end infinite;
}
`,
`
body {
width: 450px;
margin: 0 auto;
overflow: hidden;
white-space: nowrap;
box-sizing: border-box;
animation: marquee 50s linear infinite;
}
/* Make it move */
@keyframes marquee {
0% { text-indent: 27.5em }
100% { text-indent: -105em }
}
`][~~Math.floor(Math.random()*2)]
document.head.appendChild(style);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment