Created
January 20, 2015 11:06
-
-
Save plantvsbirds/f9539ea56316fdf8ca6b to your computer and use it in GitHub Desktop.
// source http://jsbin.com/pipinu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
div#out > div { | |
background:url(http://121.40.175.118:12349/static/1051467570034ff27c1ce6db48cd9dba.jpg) no-repeat; | |
width:150px; | |
height:150px; | |
float:left; | |
overflow:hidden; | |
transition: transform .5s; | |
-moz-transition: -moz-transform .5s; | |
-webkit-transition: -webkit-transform .5s; | |
} | |
div#aluba{ | |
/*transform: rotateY(-30deg);*/ | |
transform-origin: 0px 0px 0px; | |
} | |
div#qqq{ | |
/* transform: rotateY(30deg);*/ | |
transform-origin: 150px 0px 0px; | |
} | |
div#out { | |
overflow:visible; | |
perspective : 2000px; | |
perspective-origin: 150px 75px; | |
width:300px; | |
}; | |
</style> | |
</head> | |
<body> | |
ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg | |
<div id="out"> | |
<div id="aluba" data-rotate="30"></div> | |
<div id="qqq" data-rotate="30"></div> | |
</div> | |
kspoaogfkoakwodkgokspodkgopkaopskdopkfopgaksopdkfopvkaopsdkopgkaopsdkogkvoasdgv | |
<button>hahah </button> | |
<script id="jsbin-javascript"> | |
var deg = 0; | |
$('button').click(function (){ | |
$('#aluba').css('transform','rotateY(-' + deg + 'deg)'); | |
$('#qqq').css('transform','rotateY(' + deg + 'deg)'); | |
deg += 20; | |
}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//code.jquery.com/jquery-2.1.1.min.js"><\/script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg ashiudguhaiushudhguiuashudg | |
<div id="out"> | |
<div id="aluba" data-rotate="30"></div> | |
<div id="qqq" data-rotate="30"></div> | |
</div> | |
kspoaogfkoakwodkgokspodkgopkaopskdopkfopgaksopdkfopvkaopsdkopgkaopsdkogkvoasdgv | |
<button>hahah </button> | |
</body> | |
</html></script> | |
<script id="jsbin-source-css" type="text/css">div#out > div { | |
background:url(http://121.40.175.118:12349/static/1051467570034ff27c1ce6db48cd9dba.jpg) no-repeat; | |
width:150px; | |
height:150px; | |
float:left; | |
overflow:hidden; | |
transition: transform .5s; | |
-moz-transition: -moz-transform .5s; | |
-webkit-transition: -webkit-transform .5s; | |
} | |
div#aluba{ | |
/*transform: rotateY(-30deg);*/ | |
transform-origin: 0px 0px 0px; | |
} | |
div#qqq{ | |
/* transform: rotateY(30deg);*/ | |
transform-origin: 150px 0px 0px; | |
} | |
div#out { | |
overflow:visible; | |
perspective : 2000px; | |
perspective-origin: 150px 75px; | |
width:300px; | |
};</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var deg = 0; | |
$('button').click(function (){ | |
$('#aluba').css('transform','rotateY(-' + deg + 'deg)'); | |
$('#qqq').css('transform','rotateY(' + deg + 'deg)'); | |
deg += 20; | |
});</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div#out > div { | |
background:url(http://121.40.175.118:12349/static/1051467570034ff27c1ce6db48cd9dba.jpg) no-repeat; | |
width:150px; | |
height:150px; | |
float:left; | |
overflow:hidden; | |
transition: transform .5s; | |
-moz-transition: -moz-transform .5s; | |
-webkit-transition: -webkit-transform .5s; | |
} | |
div#aluba{ | |
/*transform: rotateY(-30deg);*/ | |
transform-origin: 0px 0px 0px; | |
} | |
div#qqq{ | |
/* transform: rotateY(30deg);*/ | |
transform-origin: 150px 0px 0px; | |
} | |
div#out { | |
overflow:visible; | |
perspective : 2000px; | |
perspective-origin: 150px 75px; | |
width:300px; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var deg = 0; | |
$('button').click(function (){ | |
$('#aluba').css('transform','rotateY(-' + deg + 'deg)'); | |
$('#qqq').css('transform','rotateY(' + deg + 'deg)'); | |
deg += 20; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment