Distribuiţi
Vezi subiectul anteriorIn josVezi subiectul urmator
avatar
eIonuț
Administrator
Mesaje : 2019
Joined : 05/04/2011
Varsta : 23
Oras : Bucuresti
Reputatie : 1

Toateversiunile: Slider elegant v3

la data de Vin Mar 06 2015, 16:33
Sliderul se poate adauga in Generalitati sau intr-o pagina html.

Cod:
<div>
   <style type="text/css">

.picshow { z-index:444; position:relative; background-color:#ffffff; width: 100%; height: 135px}

.picshow_main { position: relative; width: 640px; height: 300px}

.picshow_main .imgbig { filter: progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward); width: 640px; height: 300px}

.picshow_change {padding-left: 550px;position: absolute; text-align: left; bottom: 0px; height: 30px; right: 0px; left: 10px;}

.picshow_change img {width:15px; height: 15px; border-radius: 10px;}

.picshow_change a { border-radius: 10px; display: block; float: left; margin-right: 5px;  -display: inline}

a.axx { border-color: #555; border-radius: 10px;}

a.axx:hover {border-color: #000}

a.axx img { filter: alpha(opacity=40); opacity: 0.4; -moz-opacity: 0.4; border-radius: 10px;}

a.axx:hover img {filter: alpha(opacity=100); opacity: 1.0; -moz-opacity: 1.0}

a.bxx { border-color: #000; border-radius: 10px;}

a.bxx:hover {border-color: #000}

img{

border:0px}

</style> <script language="javascript">

 var counts = 3;

 img1 = new Image();

 img1.src = 'http://s10.postimg.org/fsanrx6ux/image.jpg';

 img2 = new Image();

 img2.src = 'http://s10.postimg.org/9smwo9m2h/poul.jpg';

 img3 = new Image();

 img3.src = 'http://s10.postimg.org/jne1uhq0p/pol.jpg';

 

 var smallImg = new Array();

 smallImg[0] = 'http://i.imgur.com/hWaTv.png';

 smallImg[1] = 'http://i.imgur.com/hWaTv.png';

 smallImg[2] = 'http://i.imgur.com/hWaTv.png';

 

 url1 = 'link1';

 url2 = 'link2';

 url3 = 'link3';

 

 alt1 = new Image();

 alt1.alt = 'TITULO DEL TEMA 1';

 alt2 = new Image();

 alt2.alt = 'TITULO DEL TEMA 2';

 alt3 = new Image();

 alt3.alt = 'TITULO DEL TEMA 3';

 var nn = 1;

 var key = 0;

 function change_img() {

  if (key == 0) {

  key = 1;

  } else if (document.all) {

  document.getElementById("pic").filters[0].Apply();

  document.getElementById("pic").filters[0].Play(duration = 2);

  }

  eval('document.getElementById("pic").src=img' + nn + '.src');

  eval('document.getElementById("url_theme").href=url' + nn);

  eval('document.getElementById("pic").alt=alt' + nn + '.alt');

  if (nn == 1) {

  document.getElementById("url_theme").target = "_blank";

  document.getElementById("url_theme").style.cursor = "pointer";

  } else {

  document.getElementById("url_theme").target = "_blank"

  document.getElementById("url_theme").style.cursor = "pointer"

  }

 

  for ( var i = 1; i <= counts; i++) {

  document.getElementById("xxjdjj" + i).className = 'axx';

  }

  document.getElementById("xxjdjj" + nn).className = 'bxx';

  nn++;

  if (nn > counts) {

  nn = 1;

  }

  tt = setTimeout('change_img()', 7000);

 }

 function changeimg(n) {

  nn = n;

  window.clearInterval(tt);

  change_img();

 }

 function ImageShow() {

  document.write('<div class="picshow_main">');

  document.write('<div><a id="url_theme"><img id="pic" class="imgbig" /></a></div>');

  document.write('<div class="picshow_change">');

  for ( var i = 0; i < counts; i++) {

  document.write('<a href="javascript:changeimg(' + (i + 1)

    + ');" id="xxjdjj' + (i + 1)

    + '" class="axx" target="_self"><img src="' + smallImg[i]

    + '"></a>');

  }

  document.write('</div></div>');

  change_img();

 }

</script> <script language="javascript" type="text/javascript">

 ImageShow();

</script>
</div>



Poti modifica foarte usor timpul de defilare, poti modifica latimea si lungimea sliderului.
Vezi subiectul anteriorSusVezi subiectul urmator
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum