Well, as almost anything regarding readers, it depends.
Fantasy and sci-fi are broad genres. They have several subgenres each, and not every subgenre on each one caters to the entire public that reads sci-fi or fantasy. When you are mixing sci-fi and fantasy, you are actually mixing up subgenres of the two, and that combination may or may not work in your favor. Still, we have some very good examples of how it can work nicely - and not just on books!
Note that I'm not giving just examples on which sci-fi and fantasy are mixed in equal parts - some of those examples just have a little bit of the other genre added in for extra flavor.
Shadowrun is a RPG setting which mixes up heavily sci-fi and fantasy elements. It is one of the best examples how to make elves, orcs and The Matrix work on the same universe.
Discworld is a heavy fantasy work with some dabbling on sci-fi elements. While it is fantasy to the core, the sci-fi elements spice up the books in a interesting way when they appear. They are not core to it by no means, but they do add up to the works.
Star Wars is a popular space opera with heavy fantasy elements on a "spacey" backdrop. While there are spaceships, FTL travel, and laser weapons, the core of this work is heavily grounded around the magical energy that is The Force, sword-based duels and mystical overtones.
Foundation by Isaac Asimov is a heavy sci-fi book with a drop of magic on it, by means of telepathic powers of some characters. While there is a scientific explanation for it on the books, it still has that "plot-powered" usefulness that magic usually has.
Golarion is the default RPG setting for Pathfinder. While it is mostly fantasy, it does have some hints of sci-fi with its multiple planets, aliens, and even the possibility of magic-powered space travel.
The Dark Tower by Stephen King. It is a incredible series (for the good and the bad meanings of the word "incredible"), and has several fantasy elements mashed up with a really subtle sci-fi background.
Iron Kingdoms is a RPG setting that is mix of tech and magic that has a deep "steampunky" feel. It has a really detailed way of explaining how magic-powered tech works, and is an awesome reading, even if you don't intend to play it.
Warhammer 40K is the pinnacle of the "mixed up stuff", with space-faring elves, armored super-soldiers, psychic powers, and almost everything you can find on fantasy and sci-fi mixed up together. While it seems a bit dark because of the background narrative, it is an excellent example on how those two broad genres can be mixed up together.
The World of Synnibarr is... well, this one can't really be explained without a Google Image search. I'll leave it up to you to check it, but it is an awesome game if played with the right mindset.
Asura's Wrath is an incredible tale in the form of a video game. It mixes up some barely used mythology with sci-fi tones that make the game memorable in several ways. It has a space cowboy ninja Jesus, a really angry cybernetic dad, space battles, religious overtones and a super-weapon somewhat reminiscent of the Death Star, powered by human souls. It is a hell of a trip.
As you can see, mixing up fantasy and sci-fi is not just possible but done pretty frequently. It is not something that can be done to make every single reader happy, by no means, but it is done and it works if your works are interesting enough!