Jump to content

arsentev78

Neophyte
  • Posts

    1
  • Joined

  • Last visited

arsentev78's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. Скажите пожалуйста, можно ли внести изменения в скрипт, что бы первая картинка слайд шоу появлялось плавно. <script type="text/javascript" src="js/jquery.min.js"> </script> <style> #bg { position:fixed; top:-50%; left:-50%; width:200%; height:200%; } #bg img { position:absolute; top:0; left:0; right:0; bottom:0; margin:auto; min-width:50%; min-height:50%; } #page-wrap { position: relative; z-index: 2; width: 400px; margin: 50px auto; padding: 20px; background: white; -moz-box-shadow: 0 0 20px black; -webkit-box-shadow: 0 0 20px black; box-shadow: 0 0 20px black; } p { font: 15px/2 Georgia, Serif; margin: 0 0 30px 0; text-indent: 40px; } </style> </head> <body> <div id="bg"> <img src="images/1.jpg" alt="Hallway" id="slide_show" > </div> <script type="text/javascript"> var imgs = ["images/1.jpg","images/2_2.jpg","images/3.jpg","images/4.jpg","images/5.jpg","images/6.jpg"]; var text = ['Картинка 1','<a href="index.php">Картинка 2</a>', '<font color="red">Картинка 3</font>','Картинка 4']; var n=0; time=400; play=setInterval("chgImg(0)", 5000); function chgImg(number) { if (number!=0) n=number-2; $('#slide_show').fadeOut(time, function() { //для картинок $(this).attr('src', imgs[n]).fadeIn(time); }); $('#slide_text').fadeOut(time, function() { //для текста $(this).html(text[n]).fadeIn(time); }); n++; if (n>=imgs.length) n=0; } </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy