Hyun-Jin Ryu (7-3) allowed four hits and two runs over 6 2/3 innings in his first win since defeating the Angels May 28.
Matt Cain (5-5) was blasted for six hits and eight runs and four walks over 2 1/3 innings for the Giants, losers of 10 of their last 11 contests.
The Dodgers won for the 11th time in their last 13 games.
Puzzle-maker slips 'Murdoch Is Evil' into Rupert Murdoch's Sunday Telegraph
N.J. man wakes up from 10-hour sleep with knife in back