Beispiel:CSS3 text-shadow-4.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!DOCTYPE html>
<html>
<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" />
	<link href="https://fonts.googleapis.com/css?family=Monoton|Codystar|Megrim" rel="stylesheet">
	<title>Neon-Effekte mit text-shadow</title>
	<style>
		body { background: black; height: 100vh; }
		h1, p {
			font: bold 4em Helvetica, Arial, Sans-Serif;
			color: white;
			padding: 0.2em; margin: 0;
		}
		#eins {
				font-family: "Codystar";
				text-shadow:
				0 0 1px #fff,
				0 0 2px #fff,
				0 0 3px #fff,
				0 0 4px #ff00de,
				0 0 7px #ff00de,
				0 0 8px #ff00de,
				0 0 10px #ff00de,
				0 0 15px #ff00de;
				text-transform: uppercase;
		}
		#zwei {
			font-family: Monoton;
			text-shadow:
				0 0 10px #fff,
				0 0 20px #00d2ff,
				0 0 30px #00d2ff,
				0 0 40px #00d2ff,
				0 0 50px #00d2ff,
				0 0 60px #00d2ff,
				0 0 70px #00d2ff;
		}

		#drei{
				font-family: Megrim;
				text-shadow:
					0 0 1px #fff,
					0 0 2px  #fff,
					0 0 3px  #fff,
					0 0 4px  greenyellow,
					0 0 7px  greenyellow,
					0 0 8px  lime,
					0 0 10px lime,
					0 0 15px lime;
			}

			#drei span {
				-webkit-animation: neon 4s ease-in-out infinite alternate;
				animation: neon 4s ease-in-out infinite alternate;
			}
			@-webkit-keyframes neon  {
				0%   { opacity: 1; }
				30%  { opacity: 0; }
				31%  { opacity: 1; }
				48%  { opacity: 0; }
				50%  { opacity: 1; }
				100% { opacity: 1; }
			}

			@keyframes neon  {
				0%   { opacity: 1; }
				30%  { opacity: 0; }
				31%  { opacity: 1; }
				48%  { opacity: 0; }
				50%  { opacity: 1; }
				100% { opacity: 1; }
			}
		</style>
</head>
<body>
	<h1 id="eins">Neon-Effekte mit text-shadow</h1>
	<p id="zwei">Texteffekt: Neon</p>
	<p id="drei">Texteffekt: <span>N</span>eon</p>
</body>
</html>