我们希望让这个开源项目能够为全世界的人使用。
帮助翻译本教程的内容到您的语言!
将任务 带回调的动画圆圈 的解决方案中的 showCircle 函数改写为返回 Promise 而不是接受回调函数。
showCircle
新的用法
showCircle(150, 150, 100).then(div => { div.classList.add('message-ball'); div.append("Hello, world!"); });
(
150
,
100
)
.
then
div
=>
{
add
'message-ball'
;
append
"Hello, world!"
}
以任务 带回调的动画圆圈 的解决方案为基础。
在沙盒中打开解决方案。