A variant occurs in one manga of Read or Die, where the floor is in fact a lot of paper being held rigid by Yomiko's will. The building was under construction at the time.
NEEDLESS inverts this with a character who can turn things invisible - large projectiles, most of the floor except the small patch on which the heroes are standing, the wall between him and them...the trick is to keep them from realizing what he's doing.
This is part of Mysterio's M.O. in Spider-Man comics and cartoons.
Peters of Event Horizon was killed in this fashion when the evil ship created an illusion in her mind of a bridge across an open shaft with her son on the other side, resulting in her falling to her death on the gravity chamber floor.
Lasciel in the Dresden Files book Dead Beat pulls this on Harry, filling an apartment with illusionary flame and putting an illusionary fire escape outside the window before breaking the illusion to show that it could easily kill Harry, but doesn't want to.
In two Discworld books (The Colour of Magic and Moving Pictures) the Tower of Art at the University is the scene for this trope. In both cases, the hero has to ascend a spiral staircase inside a crumbling 800foot tower, trusting to their senses that the stairs are still there under their feet - this is not a given. The trick is to close your eyes and really believe the stairs are still intact and can carry your weight - even when they are not.
In Going Postal, Moist has a ghostly vision of the post office at its height and splendor. During this vision, he's walking around, and he realizes that the floor ahead of him in the vision is where the hallway he's in, in the present, abruptly ends with a long drop. One of the previous postmasters had been found, dead of a fall, right under where the hallway is, so Moist realizes this is what had happened.
In Point Blank, the second book in Anthony Horowitz' Alex Rider series, a murder is set up by putting a holographic elevator into an out-of-order elevator shaft.
In Xanth, Iris has the power of illusions, and this is one of the things she can do.
While Calesta, the Big Bad of the Coldfire Trilogy is incapable of hurting people directly, his illusion powers make it easy for people to not notice a real danger, or a way to avoid said danger. At one point he makes an entire city fail to notice an incoming tidal wave.
A version of this is used to perform a nearly perfect murder in the Father Brown series. The murderer simply informs his (blind) lover that he is holding the elevator for her, then heads up a floor (the elevators are essentially silent), heads out onto his balcony where several hundred people can testify to his location, and waits for the lover to run into the now-empty elevator shaft.
Live Action TV
House uses this a lot, in the "patient of the week is hallucinating" form.
Royal Pains does a similar version, where a "haunted" client can't tell the difference between a floor three inches below or thirty feet below.
One case in the original CSI: Crime Scene Investigation involved a woman who'd jumped off a high-rise apartment balcony in her bikini. She'd been hypnotized to think she was taking a dip at the beach.
Probe, a short-lived scifi-detective series from the Eighties, had a plot where a murderer lured people into an open elevator shaft to their deaths, by using holograms to make it seem like the elevator car had arrived.
Inverted in Stargate SG-1 when the heroes have to cross a narrow bridge over a deep chasm. One of them falls...and lands unharmed on top of the illusory hole.
In the Metal Hurlant Chronicles episode "Back to Reality", the bad guy makes a woman jump off a building by making her think she's about to jump into a pool.
Dungeons & Dragons 3rd Edition suggested in the Dungeon Master's guide that an effective trap would be an illusionary floor over a pit of acid.
Old gamers of the Castlevania series may remember Castlevania II Simons Quest and its annoying fake floors, which can only be detected if you fell through them or if you made obssessive use of Holy Water to figure out which floors aren't fake.
The Mega Man games occasionally use this trick. Two examples that stand out are Mega Man 2, where they can be detected by a weapon that follows the ground, the Bubble Lead, and 9, where there are actual enemies that fly by to create holographic platforms over pits right by the real ones.
In Spiderman The Animated Series, Spider-Man inverted this with one of Mysterio's holocubes by projecting a gaping chasm below Rhyno, making him panic and flail around.
While he occasionally does the opposite, Wile E. Coyote is known for his painting of a bridge in front of a chasm. The road runner takes the bridge, Coyote tries to chase it, rips through the picture and falls.