javascript - How to zoom cube -
hello want make div text , when click on should rotate, zoom blank page , display new content. how can it? it's have.
javascript:
var props = 'transform webkittransform moztransform otransform mstransform'.split(' '), prop, el = document.createelement('div'); for(var = 0, l = props.length; < l; i++) { if(typeof el.style[props[i]] !== "undefined") { prop = props[i]; break; } } var xangle = 0, yangle = 0; $('#cube').on('click',function(){ yangle = -180; document.getelementbyid('cube').style[prop] = "rotatex("+xangle+"deg) rotatey("+yangle+"deg)"; });
Comments
Post a Comment