Take a bit of airline tubing and seal it in a large circle or oval and place that around the filter outlets. Floaters like duckweed, frogbit, DWL, etc won't be able to pass the airline tubing on the surface. This is what I do in most of my tanks with surface floaters.
If you mean floating like anachris getting sucked into the filter intake, I sewed a hairband into a clean, cut pantyhose and I slip it over my intake. It prevents baby shrimp and fish from getting sucked up as well, I just peel mine off weekly and replace with a new one.