Text-shadow outline demo

Size
2,218 Kb
Views
42,504

How do I make an text-shadow outline demo?

What is a text-shadow outline demo? How do you make a text-shadow outline demo? This script and codes were developed by Matthias Dittgen on 26 August 2022, Friday.

Text-shadow outline demo Previews

Text-shadow outline demo - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>text-shadow outline demo</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="info"> <h1>Text-shadow animation</h1> <p>…demonstrating multiple text-shadows</p>
</div>
<h2>shadow</h2> <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 outline demo - Script Codes CSS Codes

html,
body { width: 100%; height: 100%; margin: 0;
}
body{ position: relative; background-color: #333333;
}
#info { position: absolute; top: 0px; left: 0px; margin: 12px 0 0 12px;
}
h1 { color: #eeeeee; font-size: 21px; font-weight: normal; margin: 0;
}
p, a { margin: 3px 0 0 0; color: #cccccc; font-size: 13px;
}
h2{ position: absolute; top: 100px; left: 70px; font-family: Tahoma; font-weight: bold; font-size: 18px; -webkit-font-smoothing: antialiased; color: #fff; text-shadow: 2px 2px 1px #999, 0px 3px 1px #999,	-2px 2px 1px #999,	-3px 0px 1px #999,	-2px -2px 1px #999, 0px -3px 1px #999, 2px -2px 1px #999, 3px 0px 1px #999;
}

Text-shadow outline demo - Script Codes JS Codes

$(function () { // dom ready event var h = $('h2'); var ts = h.css('text-shadow'); var distance = 1; var blur = 1; var count = 0; var dir = 1; var size = 50; var val1, val2, val3; var loop = function () { if (count >= 50) distance = -1; if (count <= 0) distance = 1; count += distance; ts = ts.replace(/(-?\d*)px (-?\d*)px (-?\d*)px/g, function(match, group1, group2, group3) { val1 = parseInt(group1, 10); val1 += (val1 < 0 ? -1 : (val1 === 0 ? 0 : 1)) * distance; val2 = parseInt(group2, 10); val2 += (val2 < 0 ? -1 : (val2 === 0 ? 0 : 1)) * distance; val3 = parseInt(group3, 10); val3 = blur + Math.floor(count/5); return val1 + 'px ' + val2 + 'px ' + val3 + 'px'; }); h.css('text-shadow', ts); }; setInterval(loop, 1000/60);
});
Text-shadow outline demo - Script Codes
Text-shadow outline demo - Script Codes
Home Page Home
Developer Matthias Dittgen
Username matths
Uploaded August 26, 2022
Rating 3
Size 2,218 Kb
Views 42,504
Do you need developer help for Text-shadow outline demo?

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!

Matthias Dittgen (matths) Script Codes
Create amazing web content 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!