Created
July 23, 2018 00:23
-
-
Save CodeMyUI/e91e730e0255521deb3a10101e0247da to your computer and use it in GitHub Desktop.
Blend mode CRT effect loader
This file contains 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="text"> | |
<div class="r">Loading...</div> | |
<div class="g">Loading...</div> | |
<div class="b">Loading...</div> | |
</div> |
This file contains 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
body { | |
font-family: 'Source Sans Pro', sans-serif; | |
background-color:#323133; | |
&:after { | |
content: ''; | |
position: absolute; | |
top:0px; | |
left:0px; | |
right:0px; | |
bottom:0px; | |
z-index:1000; | |
background: repeating-linear-gradient(0deg, #111 0px, #111 1px, transparent 2px, transparent 5px); | |
background-size:100% 5px; | |
animation: lines 2s ease-out infinite; | |
opacity:0.3; | |
mix-blend-mode: color-burn; | |
pointer-events: none; | |
} | |
.text, .text >* { | |
position: absolute; | |
top:50%; | |
left:50%; | |
transform:translate(-50%,-50%); | |
} | |
.text { | |
>* { | |
font-size:80px; | |
animation: giggle 1s ease infinite; | |
mix-blend-mode: difference; | |
} | |
.r { | |
color:#f00; | |
left:-0.5px; | |
} | |
.g { | |
color:#0f0; | |
animation-delay:-0.67s; | |
} | |
.b { | |
color:#00f; | |
animation-delay:-0.33s; | |
left:0.5px; | |
} | |
} | |
} | |
@keyframes giggle { | |
0%, 100% { | |
transform:translate(-50%,-50%) translateY(-2px); | |
} | |
50% { | |
transform:translate(-50%,-50%) translateY(2px); | |
} | |
} | |
@keyframes lines { | |
0% { | |
background-position:0px 0px; | |
} | |
100% { | |
background-position:0px 25px; | |
} | |
} |
This file contains 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
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment