Tengo un slideshow en el que muestro 3 textos que aparecen (en vez de imagenes aparecen textos). El problema es que no consigo que aparezcan en posiciones diferentes. Por ejemplo el 1º arriba, el 2º en el centro y el 3º abajo. Este es el jquery que los controla:
Código Javascript:
Ver original
var lightAnim = false; var animTimeout = 6500; var startOverlay = '155px'; var startFg = '30px'; var endOverlay = '185px'; var endFg = '0px'; $(function() { // Low end browsers receive light transitions if($.browser.msie && $.browser.version < 9) { lightAnim = true; } // Setup slideshow var slides = $('#slideshow .slide'); var slideBgs = $('#slide-bgs'); if(slides.length > 1) { slideBgs.maximage({ fillElement: '#slideshow', backgroundSize: 'cover', overrideMSIEStop: true, cycleOptions: { fx: 'fade', speed: lightAnim ? 200 : 700, timeout: animTimeout, before: onCycleBefore, after: onCycleAfter, pause: true }, onFirstImageLoaded: function() { if (lightAnim) { slideBgs.show(); } else { slideBgs.fadeIn('fast'); } } }); $('#dots').show(); $('#dots .dot').each(function(i){ $(this).click(function(){ slideBgs.cycle(i); }); }); $('div.slide, div.slide a').hover(function() { slideBgs.cycle('pause'); },function() { slideBgs.cycle('resume'); }); } else { if (lightAnim) { // No scaling for old browsers with a single marquee slideBgs.show(); slides.show(); $('div.overlay').css('top', endOverlay).show(); $('div.foreground').css('top', endFg).show(); } else { slideBgs.maximage({ fillElement: '#slideshow', backgroundSize: 'cover', overrideMSIEStop: true, cycleOptions: { fx: 'fade', speed: lightAnim ? 200 : 700, timeout: animTimeout, pause: false }, onFirstImageLoaded: function() { slides.fadeIn(function() { slideBgs.fadeIn('fast'); $('div.overlay', slides).animate({opacity: 'toggle', top: endOverlay}, 800, 'easeOutQuad'); $('div.foreground', slides).animate({opacity: 'toggle', top: endFg}, 800, 'easeOutQuad'); }); } }); } } $('#search-box').focus(function(){ clearTimeout(searchTimeOut); $(this).addClass('hover').animate({ width: '192px' }, 'fast'); }).blur(function(){ searchTimeOut = setTimeout(closeSearch,200); }); }); var searchTimeOut; function closeSearch() { $('#search-box').removeClass('hover').animate({ width: '33px' }, 'fast'); } function onCycleBefore(curr, next, opts) { // Fade out current slide overlays var slide = $('div.slide-' + opts.currSlide); var overlay = $('div.overlay', slide); var foreground = $('div.foreground', slide); slide.fadeOut(function() { // Reset internals overlay.hide(); foreground.hide(); if (!lightAnim) { overlay.css('top', startOverlay); foreground.css('top', startFg); } }); if(curr == next) { // Initial $($('#dots .dot')[opts.currSlide]).addClass('active'); } else { // Normal $($('#dots .dot')[opts.currSlide]).removeClass('active'); $($('#dots .dot')[opts.nextSlide]).addClass('active'); } } function onCycleAfter(curr, next, opts) { // Fade in current slide overlays var slide = $('div.slide-' + opts.currSlide); slide.fadeIn(function() { if (lightAnim) { $('div.overlay', slide).css('top', endOverlay).show(); $('div.foreground', slide).css('top', endFg).show(); } else { $('div.overlay', slide).animate({opacity: 'toggle', top: endOverlay}, 800, 'easeOutQuad'); $('div.foreground', slide).animate({opacity: 'toggle', top: endFg}, 800, 'easeOutQuad'); } }); }
el css:
Código CSS:
Ver original
#slideshow { position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 742px; min-width: 1000px; color: #fff; overflow: hidden; -webkit-transform-style: preserve-3d; -webkit-backface-visibility: hidden; } #slide-bgs { display: none; position: absolute !important; -webkit-transform-style: preserve-3d; -webkit-backface-visibility: hidden; } #slide-bgs img { -webkit-transform-style: preserve-3d; -webkit-backface-visibility: hidden; } #slideshow .slide { position: absolute; top: 100; left: 0; z-index: 1; display: none; height: 742px; width: 100%; } #slideshow .slide-0 .overlay { position: relative; top: 155px; left: 42%; display: none; width: 610px; text-align:right; } #slideshow .slide-1 .overlay { position: relative; top: 85%; left: 19%; display: none; width: 1050px; text-align:left; } #slideshow .slide-2 .overlay { position: relative; top: 55%; left: 19%; display: none; width: 950px; text-align:left; } #slideshow .slide a { color: #fff; text-decoration: none; outline: 0; display:block; } #slideshow .slide a:focus { outline: 0; } #slideshow .slide div.foreground { position: absolute; display: none; left: 55%; margin-left: -745px; top: 30px; } #slideshow .slide span.lead { font-size: 40px; line-height: 50px; font-weight: 300; } #slideshow .slide span { font-weight: 300; padding: 0; position:relative; } #slideshow .slide span.small { font-size: 45px; font-family: "Raleway", sans-serif; margin:0px; padding:0px; white-space:nowrap; } #slideshow .slide span.medium { font-size: 55px; font-weight:bold; margin: 0px; padding:0px; } #slideshow .slide span.large { font-size: 90px; left: -7px; margin: 0px; padding:0px; } #slideshow .slide span.large-next { margin: 0 0 13px 0; } #slideshow .slide span.medium-next { margin: 0 0 13px 0; } #slideshow .slide span.small-next { margin: 0 0 10px 0; } #slideshow .slide .info { display: block; font-family: "Raleway", sans-serif; font-size: 20px; font-weight: 300; margin: 0 0 29px; word-spacing:normal; } #slideshow .slide .info2 { display: block; font-family: "Raleway", sans-serif; font-size: 20px; font-weight:bold; margin: 0 0 29px; word-spacing:normal; } #slideshow .slide .info3 { font-family: "Raleway", sans-serif; font-size: 20px; font-weight: 300; margin: 0 0 5px; word-spacing:normal; } #slideshow .slide .info4 { font-family: "Raleway", sans-serif; font-size: 20px; font-weight: bold; margin: 0 0 5px; word-spacing:normal; } #slideshow .slide span.btn { border-radius: 6px; display: inline-block; font-size: 18px; padding: 4px 24px 4px 10px; height: 26px; background-color: #1BACD3; background-image: url("../images/home-slide-cta-arrow2.png"); background-repeat:no-repeat; background-position: 100% 13px; -webkit-transition: all 0.2s; -moz-transition: all 0.2s; -o-transition: all 0.2s; -ms-transition: all 0.2s; transition: all 0.2s; } #slideshow .slide a:hover span.btn { color: #000; background-color: #fff; background-image:url("../images/home-slide-cta-arrow2-hover.png"); cursor:pointer; }
el html:
Código HTML:
Ver original
<div id="slideshow"> <div id="dots"> <div id="dots-inner"> </div> </div> <div id="slide-bgs"> <img src="images/bg1.png" width="1600" height="872" alt="Img1" title="Img1" border="0" /> <img src="images/bg2.png" width="1600" height="898" alt="Img1" title="Img2" border="0" /> <img src="images/bg3.png" width="1600" height="768" alt="Cloud" title="Cloud" border="0" /> </div> <div class="slide slide-0"> <div class="overlay"> <a href="" title="Posicionamiento"> <span class="info">Consulte nuestros planes especializados de </a> </div> </div> <div class="slide slide-1"> <div class="overlay"> <a href="" title="Email"> <p> </p> </a> </div> </div> <div class="slide slide-2"> <div class="overlay"> <a href="" title="Desarrollo"> <p> </p> <span class="medium medium-next"> salto empresa </span> <span class="info">Nosotros lo hacemos realidad con el </a> </div> </div> </div>
Por favor me ayudan a entender esto. Gracias.