gpt4 book ai didi

jquery - jquery 动画不起作用。

转载 作者:行者123 更新时间:2023-12-01 06:50:44 25 4
gpt4 key购买 nike

我的代码有什么问题吗?动画即将在两个值之间更改单元格的宽度。动画不起作用。你能修复一下脚本部分吗?我很着急。

<!DOCTYPE html>
<html>
<head>
<script src="jquery-1.9.1.js" type="text/javascript"></script>
<style type="text/css">
.tbl{display: table;}
.cell{display: table-cell;}
.container{background: url("bgs/12.png")no-repeat;width: 179px;height: 119px;}
#leftP{background: url("bgs/16.png")no-repeat right;width: 86px;height: 119px}
</style>
<script type="text/javascript">

$(document).ready(function(){
function Animation(){
$('leftP').animate({width:'48px'},"slow");
$('leftP').animate({width:'86px'},"slow","",Animation());

}
});
</script>
<title></title>
</head>
<body>
<div class="container tbl">
<div id="leftP" class="cell width"></div>
<div class="cell"></div>
</div>
</body>
</html>

最佳答案

你没有在任何地方调用Animation()...它不会做任何事情,除非你在某个地方调用这个函数Animation()...

关于jquery - jquery 动画不起作用。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15471029/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com