Moin,
ich sitze an einer CSS-Slideshow - die funktioniert auch schon richtig großartig, nun möchte ich bloß noch, daß die einzelnen Bilder jeweils mit einer separaten Verlinkung versehen werden.
Dachte ich, nehm ich den HTML-Code her, da stehen die Bilder einzeln aufgelistet in <div>-Elementen. Also mit <a href></a> die <img src=""> "eingekreist", und dann dachte ich, sollte das funktionieren.
Das war falsch, nur die Verlinkung mit dem höchsten z-index funktioniert - alle anderen werden ignoriert.
Der HTML-Code sieht folgendermaßen aus:
<div id="1" class="shadow" style="z-index:1"><a href="http://cgi.ebay.de/1"><img src="gransfors.jpg"></a></div>
<div id="2" class="shadow" style="z-index:2"><a href="http://cgi.ebay.de/2"><img src="induktionskochfeld.jpg" /></a></div>
<div id="3" class="shadow" style="z-index:3"><a href="http://cgi.ebay.de/3"><img src="karcher.jpg" /></a></div>
<div id="4" class="shadow" style="z-index:4"><a href="http://cgi.ebay.de/4"><img src="vakuumierer.jpg" /></a></div>
<div id="5" class="shadow" style="z-index:5"><a href="http://cgi.ebay.de/5"><img src="schneeschieber.jpg" /></a></div>
Das CSS Sheet
#stage{position:relative;height:281px;width:450px;margin:0 auto;} #stage div {position:absolute;left:60;} @-webkit-keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100%{opacity:1;} } @-moz-keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100% {opacity:1;} } @-o-keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100% {opacity:1;} } @keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100% {opacity:1;} } #stage div { -webkit-animation-name: cf4FadeInOut; -webkit-animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; -webkit-animation-duration: 15s; -moz-animation-name: cf4FadeInOut; -moz-animation-timing-function: ease-in-out; -moz-animation-iteration-count: infinite; -moz-animation-duration: 15s; -o-animation-name: cf4FadeInOut; -o-animation-timing-function: ease-in-out; -o-animation-iteration-count: infinite; -o-animation-duration: 15s; animation-name: cf4FadeInOut; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-duration: 15s; }
#stage div:nth-of-type(1) { -webkit-animation-delay: 12s; -moz-animation-delay: 12s; -o-animation-delay: 12s; animation-delay: 12s; }
#stage div:nth-of-type(2) { -webkit-animation-delay: 9s; -moz-animation-delay: 9s; -o-animation-delay: 9s; animation-delay: 9s; }
#stage div:nth-of-type(3) { -webkit-animation-delay: 6s; -moz-animation-delay: 6s; -o-animation-delay: 6s; animation-delay: 6s; }
#stage div:nth-of-type(4) { -webkit-animation-delay: 3s; -moz-animation-delay: 3s; -o-animation-delay: 3s; animation-delay: 3s; }
#stage div:nth-of-type(5) { -webkit-animation-delay: 0s; -moz-animation-delay: 0s; -o-animation-delay: 0s; animation-delay: 0s; }
Witzigerweise funktioniert die Verlinkung, sobald das CSS-Sheet außen vor ist.
Mit der Bitte um Hilfe,
B.
ich sitze an einer CSS-Slideshow - die funktioniert auch schon richtig großartig, nun möchte ich bloß noch, daß die einzelnen Bilder jeweils mit einer separaten Verlinkung versehen werden.
Dachte ich, nehm ich den HTML-Code her, da stehen die Bilder einzeln aufgelistet in <div>-Elementen. Also mit <a href></a> die <img src=""> "eingekreist", und dann dachte ich, sollte das funktionieren.
Das war falsch, nur die Verlinkung mit dem höchsten z-index funktioniert - alle anderen werden ignoriert.
Der HTML-Code sieht folgendermaßen aus:
<div id="1" class="shadow" style="z-index:1"><a href="http://cgi.ebay.de/1"><img src="gransfors.jpg"></a></div>
<div id="2" class="shadow" style="z-index:2"><a href="http://cgi.ebay.de/2"><img src="induktionskochfeld.jpg" /></a></div>
<div id="3" class="shadow" style="z-index:3"><a href="http://cgi.ebay.de/3"><img src="karcher.jpg" /></a></div>
<div id="4" class="shadow" style="z-index:4"><a href="http://cgi.ebay.de/4"><img src="vakuumierer.jpg" /></a></div>
<div id="5" class="shadow" style="z-index:5"><a href="http://cgi.ebay.de/5"><img src="schneeschieber.jpg" /></a></div>
Das CSS Sheet
#stage{position:relative;height:281px;width:450px;margin:0 auto;} #stage div {position:absolute;left:60;} @-webkit-keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100%{opacity:1;} } @-moz-keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100% {opacity:1;} } @-o-keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100% {opacity:1;} } @keyframes cf4FadeInOut { 0% {opacity:1;} 13% {opacity:1;} 20% {opacity:0;} 93% {opacity:0;} 100% {opacity:1;} } #stage div { -webkit-animation-name: cf4FadeInOut; -webkit-animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; -webkit-animation-duration: 15s; -moz-animation-name: cf4FadeInOut; -moz-animation-timing-function: ease-in-out; -moz-animation-iteration-count: infinite; -moz-animation-duration: 15s; -o-animation-name: cf4FadeInOut; -o-animation-timing-function: ease-in-out; -o-animation-iteration-count: infinite; -o-animation-duration: 15s; animation-name: cf4FadeInOut; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-duration: 15s; }
#stage div:nth-of-type(1) { -webkit-animation-delay: 12s; -moz-animation-delay: 12s; -o-animation-delay: 12s; animation-delay: 12s; }
#stage div:nth-of-type(2) { -webkit-animation-delay: 9s; -moz-animation-delay: 9s; -o-animation-delay: 9s; animation-delay: 9s; }
#stage div:nth-of-type(3) { -webkit-animation-delay: 6s; -moz-animation-delay: 6s; -o-animation-delay: 6s; animation-delay: 6s; }
#stage div:nth-of-type(4) { -webkit-animation-delay: 3s; -moz-animation-delay: 3s; -o-animation-delay: 3s; animation-delay: 3s; }
#stage div:nth-of-type(5) { -webkit-animation-delay: 0s; -moz-animation-delay: 0s; -o-animation-delay: 0s; animation-delay: 0s; }
Witzigerweise funktioniert die Verlinkung, sobald das CSS-Sheet außen vor ist.
Mit der Bitte um Hilfe,
B.