Beispiel:CSS2 clip.html
Aus SELFHTML-Wiki
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css" />
<title>CSS-Beispiel: clip</title>
<style>
img {
position: absolute;
overflow: hidden;
clip: rect(105px 175px 155px 105px);
transition: all 0.6s ease-in-out;
}
img:hover {
clip: rect(0px 250px 333px 0px);
}
</style>
</head>
<body>
<h1>Inhalte beschneiden mit clip</h1>
<main>
<h2>Wer bin ich?</h2>
<p>
<img src="/images/4/4d/Celsius.jpg" alt="Anders Celsius" title="Anders Celsius">
</p>
</main>
</body>
</html>