Beispiel:CSS3 filter-invert.html
Aus SELFHTML-Wiki
<!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>filter:invert</title>
<style>
figure {
display: table-cell;
padding: 1em;
}
.wenig {
-webkit-filter: invert(0.25);
filter: invert(0.25);
}
.mehr {
-webkit-filter: invert(0.75);
filter: invert(0.75);
}
.nochmehr {
-webkit-filter: invert(1);
filter: invert(1);
}
</style>
</head>
<body>
<h1>Verwendung von <code>filter:invert</code></h1>
<main>
<h2>CSS Filter: invert</h2>
<figure>
<img src="https://wiki.selfhtml.org/images/2/21/Burg.svg" alt="Burg" >
<figcaption>ohne Filter</figcaption>
</figure>
<figure>
<img class="wenig" src="https://wiki.selfhtml.org/images/2/21/Burg.svg" alt="Burg" >
<figcaption>filter: invert(0.25); </figcaption>
</figure>
<figure>
<img class="mehr" src="https://wiki.selfhtml.org/images/2/21/Burg.svg" alt="Burg" >
<figcaption>filter: invert(0.75); </figcaption>
</figure>
<figure>
<img class="nochmehr" src="https://wiki.selfhtml.org/images/2/21/Burg.svg" alt="Burg" >
<figcaption>filter: invert(1); </figcaption>
</figure>
<br>
<figure>
<img src="https://wiki.selfhtml.org/images/2/24/Lauf-3.jpg" width="160" alt="Lauf" >
<figcaption>ohne Filter</figcaption>
</figure>
<figure>
<img class="wenig" src="https://wiki.selfhtml.org/images/2/24/Lauf-3.jpg" width="160" alt="Lauf" >
<figcaption>filter: invert(0.25); </figcaption>
</figure>
<figure>
<img class="mehr" src="https://wiki.selfhtml.org/images/2/24/Lauf-3.jpg" width="160" alt="Lauf" >
<figcaption>filter: invert(0.75); </figcaption>
</figure>
<figure>
<img class="nochmehr" src="https://wiki.selfhtml.org/images/2/24/Lauf-3.jpg" width="160" alt="Lauf" >
<figcaption>filter: invert(1); </figcaption>
</figure>
</main>
</body>
</html>