본문 바로가기
웹관련/JavaScript-Jquery

[자바스크립트] rotate,scale 지원하지 않지만 사용할수 있도록 해주는 플로그인

by 착한덕환 2016. 9. 22.



<head>

<title>Jqeury Animation</title>

<meta charset='utf-8'>

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>

<script src='https://code.jquery.com/ui/1.10.4/jquery-ui.js'></script>

<script src="jquery-animate-css-rotate-scale.js"></script>

<script type="text/javascript">

</script>

<style>

*{margin:0; padding: 0}

.box1{

position: relative;

background: lightyellow;

width:200px;

height:200px;

text-align: center;

}

.box1 h1{

line-height: 100px;

position: absolute;

width:100px;height:100px;

left:0; margin-left: auto;

right:0; margin-right: auto;

border:1px solid red;

color:red;

top:0; margin-top: auto;

bottom:0;margin-bottom: auto;

background-color: lightblue;

}

.box1 p{

position: absolute;

width:100px;height:40px;

border: 1px solid blue;

}

</style>

<script>

$(document).ready(function(){

$('.box1').hover(

function(){

$('.box1 h1').animate({

top:'-200px',

left:'-200px',

backgroundColor:'#9e9',

rotate: '30deg'

},1000)

},

function(){

$('.box1 h1').animate({

top:'0',

left:'0',

backgroundColor:'#ede',

rotate: '0deg'

},1000)

}

);

$('.box1 p').css(

{'color':'red',

'fontSize':'40px'

});

});

</script>

</head>

<body>

<div class='box1'>

<h1>hello</h1>

<p>baby</p>

</div>

</body>

jquery-animate-css-rotate-scale-master.zip



다운받는곳 : https://github.com/zachstronaut/jquery-animate-css-rotate-scale/


댓글