gpt4 book ai didi

javascript - 此脚本在运行时停止

转载 作者:行者123 更新时间:2023-11-28 02:04:49 25 4
gpt4 key购买 nike

http://jsbin.com/uyawi/1879/edit

HTML 部分是

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

<style type="text/css">
</style>

</head>
<body>


<div id="marquee"><p>My scrolling text is so freakin' COOL!!!111!</p><p>My scrolling text is so freakin' COOL!!!111!</p
<p>My scrolling text is so freakin' COOL!!!111!</p</div>


</body>
</html>

这是javascript

$(function() {

var marquee = $("#marquee");
marquee.css({"overflow": "hidden", "height": "100%"});

// wrap "My Text" with a span (IE doesn't like divs inline-block)
marquee.wrapInner("<span>");
marquee.find("span").css({ "height": "100%", "display": "inline-block", "text-align":"center" });
marquee.append(marquee.find("span").clone()); // now there are two spans with "My Text"
marquee.wrapInner("<div>");
marquee.find("div").css("height", "100%");
var reset = function() {
$(this).css("margin-top", "100%");
$(this).animate({ "margin-top": "-100%" }, 5000, 'linear', reset);
};
reset.call(marquee.find("div"));

});

运行时停了一会儿,然后又运行了,你知道怎么解决吗?

最佳答案

var reset = function() {
$(this).css("margin-top", "100%");
$(this).animate({ "margin-top": "0%" }, 5000, 'linear', reset);
};

关于javascript - 此脚本在运行时停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12155885/

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