Beispiel:CSS-Hintergrund-1.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!DOCTYPE html>
<html lang="de"> 
	<head> 
		<meta charset="utf-8">
		<title>background-image</title>
		<style>
body   { 
	background-color: DeepSkyBlue ; 
	background-image: url("https://wiki.selfhtml.org/images/c/c8/Wolke.png");
	background-repeat:no-repeat;
	background-position: 90% top;
	color: midnightblue;
	height: 100vh;
}

		</style> 
	</head>
	<body>
		<h1>Hintergrund mit Rastergrafik als Hintergrundbild</h1>
		<main>
			<p>Dieses Beispiel demonstriert die Wirkung der Eigenschaft <code>background-image</code> in Verbindung mit einer Rastergrafik.</p>
		</main>
	</body>
</html>