Difference between revisions of "Team:Tuebingen/Art and Design"

Line 30: Line 30:
 
var div = document.createElement('div');
 
var div = document.createElement('div');
 
var img = document.createElement('div');
 
var img = document.createElement('div');
img.style.cssText = 'background-size:contain;height:150px;background-repeat:no-repeat;background-position:center;background-color:black;transition:transform 0.2s';
+
img.style.cssText = 'background-size:contain;height:150px;background-repeat:no-repeat;background-position:center;background-color:black;transition:transform 0.5s';
div.style.cssText = 'height:150px;display:inline;width:130px;display:none;perspective:400px;position:absolute;top:0px;left:50%;margin:0px;transition: margin 0.2s;';
+
div.style.cssText = 'height:150px;display:inline;width:130px;display:none;perspective:400px;position:absolute;top:0px;left:50%;margin:0px;transition: margin 0.5s;';
 
img.style.backgroundImage = 'url('+imgURLs[i]+')';
 
img.style.backgroundImage = 'url('+imgURLs[i]+')';
 
div.appendChild(img);
 
div.appendChild(img);
Line 40: Line 40:
 
var left = document.createElement('div');
 
var left = document.createElement('div');
 
left.style.cssText = 'position:absolute;top:0px;bottom:0px;left:0px;right:50%;z-index:100;cursor:pointer;';
 
left.style.cssText = 'position:absolute;top:0px;bottom:0px;left:0px;right:50%;z-index:100;cursor:pointer;';
left.onmouseover = function() {this.interval = window.setInterval('rotateCarousel(-10)',200);};
+
left.onmouseover = function() {this.interval = window.setInterval('rotateCarousel(-10)',500);};
 
left.onmouseout = function() {window.clearInterval(this.interval);};
 
left.onmouseout = function() {window.clearInterval(this.interval);};
 
carousel.appendChild(left);
 
carousel.appendChild(left);
 
var right = document.createElement('div');
 
var right = document.createElement('div');
 
right.style.cssText = 'position:absolute;top:0px;bottom:0px;right:0px;left:50%;z-index:100;cursor:pointer;';
 
right.style.cssText = 'position:absolute;top:0px;bottom:0px;right:0px;left:50%;z-index:100;cursor:pointer;';
right.onmouseover = function() {this.interval = window.setInterval('rotateCarousel(10)',200);};
+
right.onmouseover = function() {this.interval = window.setInterval('rotateCarousel(10)',500);};
 
carousel.appendChild(right);
 
carousel.appendChild(right);
 
slotPos = [315,0,45,90,135,180,225,270];
 
slotPos = [315,0,45,90,135,180,225,270];
 
renderCarousel();
 
renderCarousel();
 
/*slots[0].style.display = 'block';
 
/*slots[0].style.display = 'block';
slots[0].style.marginLeft = '-325px';
+
slots[0].style.marginLeft = '-375px';
 
slots[0].image.style.transform = 'rotateY(-45deg)';
 
slots[0].image.style.transform = 'rotateY(-45deg)';
 
slots[1].style.display = 'block';
 
slots[1].style.display = 'block';
Line 56: Line 56:
 
slots[1].image.style.transform = 'rotateY(0deg)';
 
slots[1].image.style.transform = 'rotateY(0deg)';
 
slots[2].style.display = 'block';
 
slots[2].style.display = 'block';
slots[2].style.marginLeft = '125px';
+
slots[2].style.marginLeft = '175px';
 
slots[2].image.style.transform = 'rotateY(45deg)';*/
 
slots[2].image.style.transform = 'rotateY(45deg)';*/
 
}
 
}

Revision as of 17:26, 18 September 2015

<
>