如何为 \documentclass{article} 中的几个带有多种颜色的单词添加动画效果

如何为 \documentclass{article} 中的几个带有多种颜色的单词添加动画效果
\documentclass[12pt]{report}
\usepackage[margin=0cm,paper height=14.3cm,paper width=16.4cm]{geometry}
\usepackage{tikz,animate}
\pagestyle{empty}
\parindent=0mm
\def\shape#1{
\begin{tikzpicture}[scale=0.25]
\draw[inner color=yellow!50!white,outer color=#1,rounded corners=.5mm] (0,0)--(1,.5)--(3,.5)--(4,0)--(3,-.5)--(1,-.5)--cycle;
\end{tikzpicture}
}
\usetikzlibrary{arrows,shapes,calc}
\begin{document}
\begin{animateinline}[loop,autoplay]{8}
\multiframe{2}{rim=2+30}{
\begin{tikzpicture}
\coordinate(2) at ([shift={(225:1)}]current page.north east);
\coordinate(1) at ([shift={(-45:1)}]current page.north west);
\coordinate(3) at ([shift={(135:1)}]current page.south east);
\coordinate(4) at ([shift={(45:1)}]current page.south west);
\node at ([xshift=2cm]current page.center){};
\foreach \i in {0,4,8,12}{\foreach \n/\m in {1/2,4/3}{
\node at ($(\n)!2cm+\i cm!(\m)$) {\shape{black!60!gray!\rim!white}};
\node at ($(\n)!3cm+\i cm!(\m)$) {\shape{white!\rim!blue}};
\node at ($(\n)!4cm+\i cm!(\m)$) {\shape{black!10!green!\rim!white}};
\node at ($(\n)!5cm+\i cm!(\m)$) {\shape{white!\rim!red}};}}
\end{tikzpicture}}
\end{animateinline}
\end{document}

答案1

\documentclass[12pt]{article}
\usepackage[top=1cm,bottom=1cm,right=1cm,left=1cm]{geometry}
\usepackage{tikz,animate}

\begin{document}

\begin{animateinline}[loop,autoplay]{5}
\multiframe{3}{rim=30+30}{
\begin{tikzpicture}
\coordinate(2) at ([shift={(225:1)}]current page.north east);
\coordinate(1) at ([shift={(-45:1)}]current page.north west);
\coordinate(3) at ([shift={(135:1)}]current page.south east);
\coordinate(4) at ([shift={(45:1)}]current page.south west);
%\node at ([xshift=2cm]current page.center)
%{\includegraphics[width=16cm,height=14cm]{eid}};
\node[scale=3] at (current page) 
{\textcolor{blue!\rim!yellow}{type your text here}};

\end{tikzpicture}}
\end{animateinline}
\end{document}

相关内容