為什么div的大小不能還原成200/200,請幫忙看下,TKS~!
<!DOCTYPE html>
<html>
?? ?<head>
?? ??? ?<meta charset="UTF-8">
?? ??? ?<title>運動框架檢驗03</title>
?? ??? ?<style type="text/css">
?? ??? ??? ?*{margin: 0;padding: 0;list-style: none;}
?? ??? ??? ?div{
?? ??? ??? ??? ?width: 200px;
?? ??? ??? ??? ?height: 200px;
?? ??? ??? ??? ?border: 30px solid red;
?? ??? ??? ??? ?background: blue;
?? ??? ??? ??? ?margin: 50px auto;
?? ??? ??? ??? ?opacity: 1;
?? ??? ??? ?}
?? ??? ?</style>
?? ??? ?
?? ??? ?<script type="text/javascript" src="js/starMove.js"></script>
?? ??? ?<script type="text/javascript">
?? ??? ??? ?window.onload=function(){
?? ??? ??? ??? ?var odiv=document.getElementById("div");
?? ??? ??? ??? ?odiv.onmouseover=function(){
?? ??? ??? ??? ??? ?starMove(odiv,{width:400,height:400,opacity:0},function(){
?? ??? ??? ??? ??? ??? ?odiv.style.background="green";
?? ??? ??? ??? ??? ??? ?starMove(odiv,{width:200,height:200,opacity:100});
?? ??? ??? ??? ??? ?});
?? ??? ??? ??? ?};
?? ??? ??? ?};
?? ??? ?</script>
?? ?</head>
?? ?<body>
?? ??? ?<div id="div"></div>
?? ?</body>
</html>
2016-11-13
這是我的移動函數,是可以實現你的效果
2016-11-12
是不是你的運動函數的問題,還有opcity:100對的嗎,按照課程里封裝的函數不應該是opcity:1才是不透明嗎
2016-11-10
不是啊,先是200/200,變成400/400,完成后再變成200/200,跟移入移出沒有關系吧,是鏈式運動,完成變大變小的~~
2016-11-09
以為你沒有寫移出的操作啊。只寫了onmouseover你的onmouseout呢