# Overlay of blocks in Beamer

I have several blocks in a slide:

\begin{block}{block 1}
block 1
\end{block}
\begin{block}{block 2}
block 2
\end{block}
\begin{block}{block 2}
block 2
\end{block}


Does anyone know how to overlay them so as to show them block by block by left-clicking mouse?

• \pause between blocks maybe? Or do want them on top of each other? Your question is not very specific to that regard. – hakaze Aug 15 '12 at 13:56

Three ways (depending on how you want them to appear, there might be other possibilities):

\documentclass{beamer}

\begin{document}
\begin{frame}
\onslide<+->{\begin{block}{block 1}
block 1
\end{block}}
\onslide<+->{\begin{block}{block 2}
block 2
\end{block}}
\onslide<+->{\begin{block}{block 3}
block 3
\end{block}}
\end{frame}

\begin{frame}
\only<1>{\begin{block}{block 1}
block 1
\end{block}}
\only<2>{\begin{block}{block 2}
block 2
\end{block}}
\only<3>{\begin{block}{block 3}
block 3
\end{block}}
\end{frame}

\begin{frame}
\begin{block}{block 1}
block 1
\end{block}\pause
\begin{block}{block 2}
block 2
\end{block}\pause
\begin{block}{block 3}
block 3
\end{block}
\end{frame}

\end{document}

• Thanks, what is the difference between the 1st and the 3rd solutions? – SoftTimur Aug 15 '12 at 14:15
• @SoftTimur \pause and \onslide behave differently when used inside environments (in my little example there will be no difference since the commands were not used inside environments). The beamer documentation contains the details. – Gonzalo Medina Aug 15 '12 at 22:45
• I found Solution 2 to be the best substitute for block transition animations. It has a lot of use cases while preparing slides. Thanks! – Dexter Jul 31 '13 at 21:12