This is how you can use the solution that Wener points out. Also, you will need to use and install the new version of the mdframed as explained here.
\documentclass{article}
\usepackage{float}
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{shadows}% needed for the shadows
% Styles
\mdfdefinestyle{shadowBox}{backgroundcolor=yellow!10,shadow=true, roundcorner=25pt,tikzsetting={draw=yellow!80!black!30, line width=1pt}}%
\mdfdefinestyle{blueBox}{backgroundcolor=blue!10,shadow=true, shadowcolor=blue!10, roundcorner=25pt,tikzsetting={draw=blue!80!black!30, line width=1pt}}%
\makeatletter
% General command that defines the mdframed
\newcommand\shadowFloat[1]{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@plain
\def\@fs@pre{\begin{mdframed}[style=#1]}%
\def\@fs@mid{}%
\def\@fs@post{\end{mdframed}}\let\@fs@iftopcapt\iffalse}
% Link the style with the frame, giving it a name
\newcommand\fs@yellowFloat{\shadowFloat{shadowBox}}
\newcommand\fs@blueFloat{\shadowFloat{blueBox}}
\makeatother
\pagestyle{empty}
\begin{document}
\floatstyle{yellowFloat}
\restylefloat{figure}% bind the style to the figure
\begin{figure}[h]
\centering
\rule{100pt}{150pt}
\caption{Some caption}
\end{figure}
\floatstyle{blueFloat}
\restylefloat{figure}% bind the style to the figure
\begin{figure}[h]
\centering
\rule{100pt}{150pt}
\caption{Another caption}
\end{figure}
\end{document}
