U0
script slide banner
Buonasera, consapevole che non offrite script o correzioni di esso sul forum sarebbe possibile sapere se il seguente codice va in conflitto con ready?=
<html> <head> <style> body{ background-color:black; padding:0; margin:0; with:645; height:323;
} img{ -webkit-transition-property pacity; -webkit-transition-duration: 3s; position:absolute; width: 645px; height: 323px; } img.fade-out{opacity:0} img.fade-in{opacity:1} </style> </head> <body> <img src="http://www.tetcomputers.it/grafica/slide1.jpg"/> <img src="http://www.tetcomputers.it/grafica/slide2.jpg"/> <img src="http://www.tetcomputers.it/grafica/slide3.jpg"/> <img src="http://www.tetcomputers.it/grafica/slide4.jpg"/> <script> var interval = 4 * 20; // Seconds between change var images = document.getElementsByTagName("img"); var imageArray = []; var imageCount = images.length; var current = 0;
var randomize = function(){ return (Math.round(Math.random() * 3 - 1.5)); } for(var i = 0; i < imageCount; i++){ images.className = 'fade-out'; imageArray = images; } imageArray.sort(randomize);
var fade = function(){
imageArray[current++].className = 'fade-out'; if(current == imageCount){ current = 0; imageArray.sort(randomize); } imageArray[current].className = 'fade-in';
setTimeout(fade, interval * 100); }; fade(); </script> </body> </html>
|