4
Text shadow animation (CSS) but I'm being extra
source link: https://codepen.io/natszafraniec/pen/gOxrKJv
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Pen Settings
HTML Preprocessor
Add Class(es) to <html>
Stuff for <head>
0 unsaved changes
xxxxxxxxxx
<p class="cool">
<span data-text="Hello,">Hello,</span>
<span data-text="I'm">I'm</span>
<span data-text="the">the</span>
<span data-text="text.">text.</span>
<span data-text="How">How</span>
<span data-text="are">are</span>
<span data-text="you,">you,</span>
<span data-text="pal?">pal?</span>
</p>
CSS (SCSS)
CSS (SCSS)
:root {
--background: #f3a683;
--base: #303952;
--accent: #786fa6;
--shadow: #e77f67;
}
html {
background: var(--background);
display: grid;
height: 100%;
place-items: center;
}
.cool {
font: bold 3rem/1.2 sans-serif;
max-width: 20rem;
span {
color: var(--shadow);
display: inline-block;
position: relative;
JS (Babel)
JS (Babel)
xxxxxxxxxx
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK