-
211005_animateJQuery 2021. 10. 5. 17:04
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
<style type="text/css">
#one{
position: relative;
width: 50px;
height: 50px;
background-color: pink;
border: 1px solid magenta;
}
</style>
</head>
<body>
<img alt="" src="../image/11.png" id="img1" width="100">
<hr>
<div id="one"></div>
<script type="text/javascript">
$("#img1").animate({width: "200px",opacity: "0.5"},"slow");
$("#img1").animate({width: "100px",opacity: "1"},"slow",function(){
//애니메이션이 끝난후 처리
//alert("애니메이션 종료~");
$(this).after("<b>THE END<b>");
});
$("#one").animate({left:"+=60"},2000).animate({borderWidth: "10px"},2000).
animate({width: "120px"},2000).animate({height: "120px"},2000);
</script>
</body>
</html>
'JQuery' 카테고리의 다른 글
211006_figure (0) 2021.10.06 211006_div,click,hide,show (0) 2021.10.06 211005_button(hide,show,toggle,slide,fade) (0) 2021.10.05 211005_list,hover,slideUp,slideDown,children (0) 2021.10.05 211005_list,click,hide,show (0) 2021.10.05