[Tex/LaTex] How to place an opaque text box over a beamer slide

beamer

I would like to be able to show a slide and then on the next transition place an opaque text box at some position over the text which explains some aspect of it. This is an example which doesn't work well.

\documentclass{beamer}
\usepackage{default}
\usepackage[pangram]{blindtext}
\usepackage{lipsum}
\usepackage[absolute,overlay]{textpos}
\setbeamerfont{title}{size=\Huge}
\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}
\setbeamercolor{title}{fg=white}
\setbeamercolor{frametitle}{fg=yellow}
\begin{document}
\begin{frame}
\lipsum[50]
\pause
\begin{textblock*}{64mm}(32mm,0.25\textheight)
    \begin{exampleblock}{}
        This is wrong!
    \end{exampleblock}
\end{textblock*}
\end{frame}
\end{document}

In my case I have white text with a black background.

How can you do this?


Using the linked question I get:

\documentclass{beamer}
\usepackage{lmodern}
\usetheme{Luebeck}
\usepackage{lipsum} % <= to insert dummy text
\usepackage[absolute,overlay]{textpos}
\setbeamerfont{title}{size=\Huge}
\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}
\setbeamercolor{title}{fg=white}
\setbeamercolor{frametitle}{fg=yellow}
\begin{document}
\begin{frame}
\frametitle{Example of block over the text}
\lipsum[1]
\only<2>{
\begin{textblock*}{64mm}(32mm,0.25\textheight)
    \begin{exampleblock}{}
    This is wrong!
    \end{exampleblock}
\end{textblock*}
}
\end{frame}
\end{document}

How can I make the text block have white text on a black background and get rid of the block of color at the top of it?

Best Answer

You can use the current page node to place some tikz code absolutly. It needs two compilations to get the correct placement:

\documentclass{beamer}
\usepackage{default}
\usepackage[pangram]{blindtext}
\usepackage{lipsum}
\setbeamerfont{title}{size=\Huge}
\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}
\setbeamercolor{title}{fg=white}
\setbeamercolor{frametitle}{fg=yellow}
\usepackage{tikz}
\begin{document}
\begin{frame}
\lipsum[50]
\only<2>{%
\tikz[overlay,remember picture]
\node[fill=red,text=white] at ([xshift=1cm,yshift=1cm]current page.center){This is wrong!};
}

\end{frame}
\end{document}

enter image description here

Related Question