Beispiel:CSS3 transform.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>Kombination zweier Transformationen</title>
<style>
#scale1:hover {
transform: translate(-50px) scale(2, 0.5) ;
}
#scale2:hover {
transform: scale(2, 0.5) translate(-50px, 25px);
}
path {
transition: all 2s ease-in-out;
fill: gold;
stroke: #337599;
stroke-width: 1;
}
</style>
</head>
<body>
<h1>Kombination zweier Transformationen<br><code>scale()</code> und <code>translate()</code></h1>
<svg width="600" height="400" viewBox=" 0 0 180 100">
<path d="m35,75 l15-45 l15,45 l-38-28 h47z" id="scale1" />
<g transform="translate(100,0)">
<path d="m35,75 l15-45 l15,45 l-38-28 h47z" id="scale2" />
</g>
</svg>
<p>Fahren Sie mit der Maus über die Sterne.</p>
</body>
</html>