7. To color 8 small squares on a $4 \times 4$ chessboard black, such that each row and each column has exactly two black squares, there are $\qquad$ different ways (answer with a number).
7. 90 .

The first row can be colored with 2 black cells in $\mathrm{C}_{4}^{2}=6$ ways. After the first row is colored, there are the following three cases.
(1) The black cells in the second row are in the same columns as those in the first row. In this case, the remaining rows have only 1 way to be colored.
(2) The black cells in the second row are in different columns from those in the first row. In this case, the third row has $\mathrm{C}_{4}^{2}=6$ ways to be colored, and the coloring of the fourth row is then determined.
(3) The black cells in the second row are exactly in the same columns as those in the first row. There are 4 such coloring methods. After the first and second rows are colored, the black cells in the third row must have one that is in a different column from the ones above, giving 2 ways to color the third row, and the coloring of the fourth row is then determined.
Therefore, the total number of coloring methods is $6 \times(1+6+4 \times 2)=90$.