-
筆記的查看全部
-
實(shí)現(xiàn)汽車上下滑動(dòng)代碼 1.html代碼 <!DOCTYPE html> <html> <head> <title>停車動(dòng)畫</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="style.css" rel="stylesheet" type="text/css"> <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> <script type="text/javascript" src="script.js"></script> </head> <body> <img class="car" src="http://img1.sycdn.imooc.com//5343d553000107a107200701.jpg" width="350" height="341"/> </body> </html> 2.css代碼 *{ padding:0px; margin:0px; } body{ background:#D5DEE7; } .car{ position:relative; top:30; left:300; } 3jquery代碼 $(document).ready(function(){ $('.car').hover(function(){ $(".car").animate({top:'500px'},{duration:600}); },function() { $(".car").animate({top:'0px'}); } ); });查看全部
-
<html> <head> <title>停車動(dòng)畫</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="style.css" rel="stylesheet" type="text/css"> <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> <script type="text/javascript" src="script.js"></script> </head>查看全部
-
$(document).ready(function(){ $(".car").hover( function(){ $(".car").animate({top:"300px"},{duration:"300"}); }, function(){ $(".car").animate({top:"0px"},{duration:"300"}); }); }); *{ padding:0px; margin:0px; } body{ background:#D5DEE7; } .car{ position:absolute; top:0; left:0; }查看全部
-
.boxgrid{ width: 720px; height: 701px; border: solid 2px #8399AF; } .boxgrid img.car{ position:absolute; top:0; left:720px; }查看全部
-
$('.boxgrid').hover(function(){ $(".car".)animate({left:'0px'},{duration:300});)},function(){ $(".car").animate({left:'720px'},{duration:300});});查看全部
-
.hover() .animate()查看全部
-
hover函數(shù) animate動(dòng)畫 duration屬性查看全部
-
思路123查看全部
-
$(document).ready(function(){ $('.car').hover(function(){ $('.car').animate({top:"600px"},{duration:600}); },function(){ $('.car').animate({top:"0"},{duration:600}); }) });查看全部
-
CSS樣式定位車圖片位置(.boxgrid img.car) position:absolute; top:0; left:720px; 用jQuery代碼讓車動(dòng)起來(lái) 1.設(shè)置移進(jìn)車位 $(".car").animate({left:'0px'},{duration:300}); 2.設(shè)置移出車位 $(".car").animate({left:'720px'},{duration:300});查看全部
-
光標(biāo)移入執(zhí)行函數(shù)1(車移進(jìn)車位),移除執(zhí)行函數(shù)2(車移出車位) $(document).ready(function(){ $(".boxgrid").hover(function(){ $(".car").animate({left:0px},{duration:300}); },function(){ $(".car").animate({left:720px},{duration:300}); }); });查看全部
-
完整代碼查看全部
-
光標(biāo)移入執(zhí)行函數(shù)1,移除執(zhí)行函數(shù)2查看全部
舉報(bào)
0/150
提交
取消