A Pen by Saijo George on CodePen.
Created
January 7, 2020 23:29
-
-
Save CodeMyUI/a6c94457f7b64c099a44cfeefacc6e54 to your computer and use it in GitHub Desktop.
Blast text
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
<p>Good decisions come from experience. Experience comes from Bad decisions. The trick is to get the experience before the bad decisions get you. </p> | |
<span class="small">by : Someone Wise <br/> | |
<span class="vsmall">CodeMyUI</span><span> |
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
var p = document.querySelector('p'); | |
p.innerHTML = p.innerHTML.replace(/(^|<\/?[^>]+>|\s+)([^\s<]+)/g, '$1<span>$2</span>'); |
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
@import url('https://fonts.googleapis.com/css?family=Gelasio&display=swap'); | |
body { | |
background: black; | |
color: white; | |
font: 3vw/1.2 'Gelasio', serif; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
max-width: 55vw; | |
margin: 0 auto; | |
min-height: 100vh; | |
perspective: 200px; | |
animation: perspective 9s cubic-bezier(.35,.06,.92,.03) infinite; | |
@keyframes perspective { | |
0% { perspective: 100px; transform: scale(.5); } | |
100% { perspective: 10000px; transform: scale(1); } | |
} | |
} | |
p { | |
transform-style: preserve-3d; | |
} | |
span { | |
display: inline-block; | |
@for $i from 1 through 150 { | |
&:nth-child(#{$i}) { | |
transform: translateZ((random() * -1000px)); | |
} | |
} | |
} | |
.small{ | |
font-size: 30px; | |
} | |
.vsmall{ | |
font-size: 20px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment