Beispiel:CSS3 text-shadow.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!DOCTYPE html>
<html lang="de">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css" />
	<title>text-shadow</title>
	<style>
h2              { text-align: center; margin-top: 50px; letter-spacing: 1em; color: white; font-size: 72px; }
h2 .rot         { text-shadow: -15px -25px 10px red, 0 -40px 10px green, 15px -25px 10px blue; }
h2 .grün        { text-shadow: 0 -40px 10px green, -15px -25px 10px red, 15px -25px 10px blue; }
h2 .blau        { text-shadow: 15px -25px 10px blue, -15px -25px 10px red, 0 -40px 10px green; }
p               { line-height: 1.5em; }
p span          { font-weight: bold; }
p .rot          { color: red; text-shadow: -2px -2px 2px red; }
p .grün         { color: green; text-shadow: 0 -2px 2px green; }
p .blau         { color: blue; text-shadow: 2px -2px 2px blue; }
</style>
</head>
<body>
	<h1>Verwendung von <code>text-shadow</code></h1>
	<main>
		<!-- #1# -->
		<h2><span class="rot">r</span><span class="grün">g</span><span class="blau">b</span></h2>

		<!-- #2# -->
		<p>rgb ist die Abkürzung für einen Farbraum, der die Farben durch das Mischen der drei Grundfarben
		<span class="rot">rot</span>, <span class="grün">grün</span> und <span class="blau">blau</span> bildet.</p>

	</main>
</body>
</html>