新增評論表單,點擊後出現並消失

新增評論表單,點擊後出現並消失

讓我們考慮一下如何在投影機上構建它,知道我們可以更改其上的文本,並使它們在單擊時出現並在單擊時消失,以便我們每次談論特定事物時都可以製作許多它們?

特別是我試圖將其作為註釋並顯示在白色部分,但它是一個數字,這是可能的,每次單擊都會出現一個特定的文字!這是圖 對不起,我對乳膠和投影機很陌生。

答案1

在邊界框設定為圖片大小的範圍內新增雲註解。這樣雲就不會佔用額外的空間。 (實際上在這個例子中不需要範圍,但是有了它,圖形可以在範圍之後繼續,而不會影響雲部分。)

\documentclass{beamer}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\begin{document}
\begin{frame}
  \frametitle{Test}
  \centering
  \begin{tikzpicture}
    \node[inner sep=0pt](Img){\includegraphics[width=0.7\linewidth]{example-image}};
    \draw<2->[line width=2pt,red](Img.north west) rectangle +(4,-2.5);
    \draw<3->[line width=2pt,black!20!green](Img.south west) rectangle ($(Img.south east) + (0,3.1)$);
    \onslide<4->{%
      \begin{scope}
        \useasboundingbox(Img.south west)--(Img.north east);
        \node[draw,cloud,anchor=south east,aspect=3,fill=blue,text=white] (Cloud) at ($(Img.north east)+(-0.5,0.5)$){2 variables};
        \draw[-latex,very thick] (Cloud.south west) to[bend right] ($(Img.center)+(2,1)$);
      \end{scope}}
  \end{tikzpicture}
\end{frame}
\end{document}

在此輸入影像描述

相關內容