Here's an option using a combination of the mdframed, newfloat, and xparse package (which is loaded by mdframed).
The following line:
\DeclareFloatingEnvironment[placement={!ht}]{myfloat}
declares a new floating environment called myfloat, which has default placement of !ht, and can be overridden.
The following lines make a new floating environment that combines myfloat together with an environment from the mdframed package:
\NewDocumentEnvironment{framefloat}{O{}O{}}
{% #1: float position (optional)
% #2: options for mdframed (optional)
\begin{myfloat}[#1]
\begin{mdframed}[roundcorner=10pt,backgroundcolor=green,#2]
}
{\end{mdframed}\end{myfloat}
}
As you can see, it uses the syntax from the xparse package to declare two optional arguments:
% #1: float position (optional)
% #2: options for mdframed (optional)
It can be used in any of the following ways (for example):
\begin{framefloat}
\begin{framefloat}[t]
\begin{framefloat}[b][backgroundcolor=blue]
\begin{framefloat}[][backgroundcolor=red]
Here's a complete MWE to play with. Each of the packages that I have used have a lot more features; explore as you see fit.
% arara: pdflatex
\documentclass{article}
\usepackage{newfloat}
\usepackage{lipsum}
\usepackage[framemethod=TikZ]{mdframed}
% new float
\DeclareFloatingEnvironment[placement={!ht}]{myfloat}
% new floating framed environment
\NewDocumentEnvironment{framefloat}{O{}O{}}
{\begin{myfloat}[#1]
\begin{mdframed}[roundcorner=10pt,backgroundcolor=green,#2]
}
{\end{mdframed}\end{myfloat}
}
\begin{document}
\lipsum
\begin{framefloat}
\lipsum[1]
\end{framefloat}
\lipsum
\begin{framefloat}[t]
\lipsum[1]
\end{framefloat}
\lipsum
\begin{framefloat}[b][backgroundcolor=blue]
\lipsum[1]
\end{framefloat}
\lipsum
\begin{framefloat}[][backgroundcolor=red]
\lipsum[1]
\end{framefloat}
\end{document}