Dunn's long homer to right off Felipe Paulino gave the White Sox the lead in the first. Dunn's sixth homer in his last 10 games was enough offense for Floyd (3-3), who allowed five hits, struck out five and walked two in 7 2-3 innings.
Floyd escaped a bases-loaded situation in the second when he got Alcides Escobar and Humberto Quintero to hit back-to-back comebackers. Kansas City loaded the bases again in the eighth on three straight singles before Floyd struck out Billy Butler for the second out on a full-count offering, ending his night after 116 pitches.
Matt Thornton came in and fanned Eric Hosmer to end the inning. Hector Santiago pitched the ninth to complete the five-hitter.
Floyd gave up five singles while bidding for his first shutout in six years.
The White Sox added a run in the third when Alejandro De Aza singled, stole second and scored on Gordon Beckham's two-out single. Dunn then doubled, but a big inning was averted when Royals left fielder Alex Gordon made a nice diving catch on Paul Konerko's sinking liner.
Alex Rios' two-out, two-run triple off the wall in right-center in the sixth made it 4-0 and chased Paulino (1-1).
Paulino, who pitched six shutout innings against the Yankees in his first start of the season six days ago, allowed seven hits, struck out six and walked one.
De Aza added an RBI single in the seventh.
NOTES: LHP Chris Sale was returned to the White Sox rotation after a one-game stint in the bullpen. There was concern about soreness in his elbow, but an MRI came up clean and Sale (3-1) will pitch Saturday against RHP Luke Hochevar (2-3). ... Dunn, who also walked twice, snapped a streak of consecutive games in which had struck out at 36, dating to last season. ... The Royals are hoping to activate reliever Greg Holland (rib cage) off the disabled list Saturday. .. White Sox reliever Jesse Crain (oblique) threw a scoreless inning in an injury rehab assignment in the minor leagues.