ich ein langes Bild, das ich auf dem Bildschirm mit einem Scroll-Effekt gleiten möge, wie auf der Webseite des Apple TV (das Floating/Scroll-Film bedeckt):CSS: Scrollen Diashow nicht zu wiederholen
das ist das Markup ich benutze:
<div class="header">
<div class="slider">
</div>
</div>
und dies ist die CSS:
.header{
height: 610px;
width: 100%;
overflow-y: scroll;
overflow-x: hidden;
}
.header .slider{
height: 540px;
background: url("../images/header.jpg");
position: relative;
border-left: 10px rgb(34,34,34) solid;
border-bottom: 10px rgb(34,34,34) solid;
border-right: 10px rgb(34,34,34) solid;
left: 0;
top: 60px;
width: 450%;
animation: moveSlideshow 40s linear infinite;
-webkit-animation: moveSlideshow 40s linear infinite;
-moz-animation: moveSlideshow 40s linear infinite;
transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
}
hier ist die CSS-Animation:
@keyframes moveSlideshow {
100% {
-webkit-transform: translateX(-300%);
}
}
kommt es, dass die Diashow Scrollen wird aber nur einmal und es rollt bald aus dem Bildschirm, nachdem das gesamte Bild gescrollt wird (und auch mit einem Teil von Anfang an!) ..
bitte helfen
das hat funktioniert, danke! :) –