Beispiel:SVG-CSS-animation-1.html
Aus SELFHTML-Wiki
<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">
<style>
#loading {
animation-name: widen-brighten;
animation-duration: 4s;
animation-direction: alternate;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
@keyframes widen-brighten {
from {
fill:darkgreen;
width: 20px;
}
to {
fill: lime;
width: 200px;
}
}
</style>
<title>SVG mit CSS animieren - 1</title>
</head>
<body>
<h1>SVG mit CSS animieren - 1 </h1>
<h2>Ladebalken in SVG - mit CSS animiert</h2>
<svg viewBox="0 0 300 100" >
<rect id="loading" x="10" y="10" width="20" height="20" />
</svg>
</body>
</html>