Hallo Community,
ich wollte euch hier mein Projekt vorstellen, und euch gleichzeitig um eure Meinung fragen: Marque Image Slider Demo
Das Ganze ist auf dem <marquee> HTML-Tag basierend, wird mit einem kleinen Javascript gesteuert und per CSS in Form gebracht.
Meiner Meinung nach läuft das Ganze schneller und ressourcensparender als das zur Vorlage stehende "jCarousel"!
Was haltet ihr davon, kann man das so hernehmen oder ist es eine schlechte Idee?
Bin offen für eure Kritik und Verbesserungsvorschläge!
LG, Flo
Edit: Das von mermshaus angesprochene Problem / Bug wurde behoben. Der Slider ist jetzt Firefox/Chrome/Safari kompatibel.
Hier ist der Quellcode für Euch, aber am besten geht ihr auf den Demo-Link und seht es euch dort an:
HTML:
CSS:
JAVASCRIPT:
ich wollte euch hier mein Projekt vorstellen, und euch gleichzeitig um eure Meinung fragen: Marque Image Slider Demo
Das Ganze ist auf dem <marquee> HTML-Tag basierend, wird mit einem kleinen Javascript gesteuert und per CSS in Form gebracht.
Meiner Meinung nach läuft das Ganze schneller und ressourcensparender als das zur Vorlage stehende "jCarousel"!
Was haltet ihr davon, kann man das so hernehmen oder ist es eine schlechte Idee?
Bin offen für eure Kritik und Verbesserungsvorschläge!
LG, Flo
Edit: Das von mermshaus angesprochene Problem / Bug wurde behoben. Der Slider ist jetzt Firefox/Chrome/Safari kompatibel.
Hier ist der Quellcode für Euch, aber am besten geht ihr auf den Demo-Link und seht es euch dort an:
HTML:
HTML:
<div id="ImageSlider"> <img class="SliderArrow" src="images_/imageslider/left.png" alt="scroll_left" title="Scroll backwards" width="34" height"40" onmousedown="scroll_right(); scroll_fast()" onmouseup="scroll_slow()"> <marquee id="imagemarquee" scrollamount="1" scrolldelay="10" width="670" height="112" behavior="alternate"> <!-- Elemente zum Durchsliden--> <a href="#"><img class="WidePicture" src="images_/testpics/1.jpg" alt="testimg" title="testimg 01" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/2.jpg" alt="testimg" title="testimg 02" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="HighPicture" src="images_/testpics/d.jpg" alt="testimg" title="testimg 03" width="66" height="100" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/3.jpg" alt="testimg" title="testimg 04" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/4.jpg" alt="testimg" title="testimg 05" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/5.jpg" alt="testimg" title="testimg 06" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="HighPicture" src="images_/testpics/e.jpg" alt="testimg" title="testimg 07" width="66" height="100" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/6.jpg" alt="testimg" title="testimg 08" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/7.jpg" alt="testimg" title="testimg 09" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="HighPicture" src="images_/testpics/f.jpg" alt="testimg" title="testimg 10" width="66" height="100" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/8.jpg" alt="testimg" title="testimg 11" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/9.jpg" alt="testimg" title="testimg 12" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="HighPicture" src="images_/testpics/g.jpg" alt="testimg" title="testimg 13" width="66" height="100" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="WidePicture" src="images_/testpics/c.jpg" alt="testimg" title="testimg 14" width="100" height="66" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> <a href="#"><img class="HighPicture" src="images_/testpics/h.jpg" alt="testimg" title="testimg 15" width="66" height="100" onmouseover="stop_scrolling()" onmouseout="start_scrolling()"></a> </marquee> <img class="SliderArrow" src="images_/imageslider/right.png" alt="scroll_right" title="Scroll forwards" width="34" height"40" onmousedown="scroll_left(); scroll_fast()" onmouseup="scroll_slow()"> </div>
CSS:
HTML:
body{ background-color:#333333; text-align:center;}#ImageSlider{ height:112px; width:748; border:1px solid #3333333; margin:auto;}.SliderArrow{ cursor:pointer; margin-bottom:36px;}.HighPicture{ border-top:solid 6px #222222; border-bottom:solid 6px #222222; border-left:solid 23px #222222; border-right:solid 23px #222222;}.WidePicture{ border-top:solid 23px #222222; border-bottom:solid 23px #222222; border-left:solid 6px #222222; border-right:solid 6px #222222;}
Code:
function scroll_left(){
document.getElementById('imagemarquee').direction='left';
}
function scroll_right(){
document.getElementById('imagemarquee').direction='right';
}
function scroll_fast(){
javascript:document.getElementById('imagemarquee').scrollAmount=20;
}
function scroll_slow(){
javascript:document.getElementById('imagemarquee').scrollAmount=1;
}
function stop_scrolling(){
javascript:document.getElementById('imagemarquee').scrollAmount=0;
}
function start_scrolling(){
javascript:document.getElementById('imagemarquee').scrollAmount=1;
}
Zuletzt bearbeitet: