Text-shadow effect on key press

Size
3,707 Kb
Views
62,744

How do I make an text-shadow effect on key press?

Press a key on the keyboard. What is a text-shadow effect on key press? How do you make a text-shadow effect on key press? This script and codes were developed by Özgür Sağıroğlu on 22 July 2022, Friday.

Text-shadow effect on key press Previews

Text-shadow effect on key press - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>text-shadow effect on key press</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://fonts.googleapis.com/css?family=Open+Sans'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { padding: 50px; background: #f1f1f1;
}
body * { font-family: "Open Sans";
}
.lorem { font-weight: 400; padding: 10px; letter-spacing: .3;
}
span { -moz-transition: all 250ms; -o-transition: all 250ms; -webkit-transition: all 250ms; transition: all 250ms;
}
.matched { text-shadow: 0px 0px 10px red;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <h1 class="lorem">Press a key on the keyboard</h1>
<h3 class="lorem"> <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nemo eligendi officiis placeat ducimus officia nihil quae unde repellat aspernatur dicta ipsum fuga dolorum magnam excepturi commodi tenetur molestiae voluptate expedita.</div> <div>Ab aliquid beatae autem cupiditate vero in maxime voluptas. Aliquid eligendi facere architecto accusamus deserunt cum nemo perferendis cupiditate eius tenetur ut unde consectetur autem iure culpa at obcaecati repellat?</div> <div>Rem qui dolores perferendis magnam non numquam enim quis reprehenderit molestias placeat voluptates vitae ducimus nostrum a ipsum quam mollitia sapiente cumque ipsa eos unde aspernatur repellendus vero sed dolorem.</div> <div>Beatae quidem laboriosam at explicabo incidunt est consectetur nam rem ex laudantium! Ducimus ipsa molestias magnam aliquam tempora dolore mollitia nisi totam facere vero quasi non necessitatibus quo dolorum inventore.</div> <div>Odit assumenda laudantium dignissimos placeat hic quo aut ab nisi blanditiis nesciunt possimus nam id pariatur fuga rerum illum eveniet maiores maxime obcaecati magni! Aut sed error debitis esse itaque.</div>
</h3> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Text-shadow effect on key press - Script Codes CSS Codes

body { padding: 50px; background: #f1f1f1;
}
body * { font-family: "Open Sans";
}
.lorem { font-weight: 400; padding: 10px; letter-spacing: .3;
}
span { -moz-transition: all 250ms; -o-transition: all 250ms; -webkit-transition: all 250ms; transition: all 250ms;
}
.matched { text-shadow: 0px 0px 10px red;
}

Text-shadow effect on key press - Script Codes JS Codes

(function() { $(function() { var $keyPresstimeout; $('.lorem').each(function() { var $newText, $self, char, i, len, ref; $self = $(this); $newText = ''; ref = $self.text(); for (i = 0, len = ref.length; i < len; i++) { char = ref[i]; $newText += "<span data-value='" + char + "'>" + char + "</span>"; } return $self.html($newText); }); $keyPresstimeout = null; return $(document).keypress(function(e) { var $val, ref; clearTimeout($keyPresstimeout); $val = String.fromCharCode((ref = e.keyCode) != null ? ref : e.which); $("span[data-value='" + $val + "']").addClass('matched'); return $keyPresstimeout = setTimeout(function() { return $('span').removeClass('matched'); }, 1000); }); });
}).call(this);
Text-shadow effect on key press - Script Codes
Text-shadow effect on key press - Script Codes
Home Page Home
Developer Özgür Sağıroğlu
Username ozgursagiroglu
Uploaded July 22, 2022
Rating 4
Size 3,707 Kb
Views 62,744
Do you need developer help for Text-shadow effect on key press?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Özgür Sağıroğlu (ozgursagiroglu) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!