Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
title: "[注解] [306] 简单的饼图" | ||
issue: "#85" | ||
--- | ||
|
||
## 交流与答疑 | ||
|
||
微信用户 **天下第二** 提问: | ||
|
||
> 我发现单个标签画饼图有一个问题,就是 100% 的状态没法显示。 | ||
> | ||
> [这篇博客](https://www.cnblogs.com/joyjoe/p/6922917.html) 用了书上的代码,如果把最下面那个图改成 `animation-delay:-100s`,本来希望是整个饼图显示 `#655` 颜色,但是实际上恢复了初始状态的绿色。 | ||
临时回复如下: | ||
|
||
我暂时没有去深入分析原因。在不改变动画代码的前提下,最简单的变通解决办法是把 `-100s` 写成 `-99.999s`。 | ||
|
||
如果你是用脚本来写入元素的 `.style.animationDelay` 的话,在写入之前减去 `0.001` 即可;或者判断一下,当发现写入值为 `100` 时,改为 `99.999` 再写入。 |