提问于:
浏览数:
1874
```tex
\documentclass[UTF8,a4paper]{article}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{math,calc,intersections,through,angles,arrows.meta,shapes.geometric,shadows,quotes,spy}
\usetikzlibrary{animations} % LaTeX and plain TeX
\usetikzlibrary[animations] % ConTeXt
\begin{document}
\tikz [animate ={ object = b, :fill = {0s = "red", 2s = "blue", begin on = click },
object = c, :fill = {0s = "green", 2s = "blue", begin on = click } }]
{
\scoped [name = a, yshift=1cm] \fill (0,0) rectangle (1.5cm,2mm);
\scoped [name = b, yshift=5mm] \fill (0,0) rectangle (1.5cm,2mm);
\scoped [name = c, yshift=0mm] \fill (0,0) rectangle (1.5cm,2mm); }
\end{document}
```
TikZ & PGF 手册(3.1.3) 手册285页照抄代码,Adobe打开PDF文件不产生动画,不明原因?谢谢!