You cannot gain trophies from players that have 700+ more trophies than you.
There is no such restriction for players that have less trophies than you. However, the less trophies a player has, the less challenging the base usually is, and so the less trophies you can gain. At some point due to integer rounding, the possible gain will be zero trophies, too.
You should also note that this “zero trophy restriction for opponents with 700+ trophies more” works in both ways. You cannot gain trophies when raiding such bases, but also you cannot lose trophies! But still you gain gold, XP and medals (!). You can use that restriction to your advantage that way. You can attack bases with 700+ more trophies non stop without any risk to lose trophies, and raid their gold, gain XP and win leagues.