Skip to content

Commit

Permalink
Add notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cssmagic committed May 9, 2018
1 parent 7644baf commit 106d8cc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/index.md
Expand Up @@ -37,7 +37,7 @@ issue: 17
303| [11] 菱形图片|-|〃|-
304| [12] 切角效果|[试读](https://github.com/cssmagic/CSS-Secrets/issues/11)|〃| [免费阅读](https://github.com/cssmagic/CSS-Secrets/issues/38)
305| [13] 梯形标签页|-|〃|-
306| [14] 简单的饼图|-|〃|-
306| [14] 简单的饼图|-|〃| [免费阅读](https://github.com/cssmagic/CSS-Secrets/issues/85)
| |
**第四章** | **视觉效果**|| [购买后阅读 <sup>↗</sup>](http://www.ituring.com.cn/book/tupubarticle/9396)|
401| [15] 单侧投影|-|〃|-
Expand Down
18 changes: 18 additions & 0 deletions notes/chapter-3/306.md
@@ -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` 再写入。

0 comments on commit 106d8cc

Please sign in to comment.