74 lines
2.2 KiB
HTML
74 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Straße</title>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
html, body {
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
background-image: url("/~zxmpy88/uebung2/assets3/background.svg");
|
|
background-size: auto 100%;
|
|
background-repeat: repeat-x;
|
|
overflow: hidden;
|
|
}
|
|
|
|
img {
|
|
width: 40%;
|
|
height: 40%;
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
@keyframes fahren_rechts {
|
|
0% {
|
|
left: -40%;
|
|
}
|
|
|
|
100% {
|
|
left: 100%;
|
|
}
|
|
}
|
|
|
|
@keyframes fahren_links {
|
|
0% {
|
|
left: 100%;
|
|
}
|
|
|
|
100% {
|
|
left: -40%;
|
|
}
|
|
}
|
|
|
|
.delay {
|
|
animation-delay: 2s;
|
|
animation-direction: reverse;
|
|
}
|
|
|
|
|
|
.lefttoright {
|
|
animation: fahren_rechts 10s linear infinite;
|
|
bottom: -5%;
|
|
left: -40%;
|
|
z-index: 1; //weiter vorne/hinten
|
|
}
|
|
|
|
.righttoleft {
|
|
animation: fahren_links 10s linear infinite;
|
|
bottom: 8%;
|
|
left: -40%;
|
|
transform: scaleX(-1);
|
|
z-index: 0; //weiter vorne/hinten
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<img class="lefttoright" src="/~zxmpy88/uebung2/assets3/car1.svg">
|
|
<img class="delay lefttoright" src="/~zxmpy88/uebung2/assets3/car2.svg">
|
|
<img class="righttoleft" src="/~zxmpy88/uebung2/assets3/car3.svg">
|
|
<img class="delay righttoleft delay" src="/~zxmpy88/uebung2/assets3/car4.svg">
|
|
|
|
</body>
|
|
</html>
|