no they are not against adsense policy. I’m already running a site for years with a Google certified partner and they themselves added this floating ad. Quora is doing the same.
you also did in your post. but how can I get iframe version of adsense tag?