8. Consider each permutation of the nine digits $1,2, \cdots, 9$ as a nine-digit number. Among them, the number of those that are divisible by 11 is $\qquad$.
Answer: 31680.
Let the sum of the digits in the odd positions of the nine-digit number $a$ be $x$, and the sum of the digits in the even positions be $y$.
If $11 \mid a$, then $11 \mid (x-y)$.
Let $x-y=11k$, since $x+y=1+2+\cdots+9=45$, and $x+y$ has the same parity as $x-y$, so $k$ can only be $\pm 1$ (it cannot be $\pm 3$, otherwise, if $k=3$, then from $x-y=33$, we get $y=6$, and the sum of four distinct positive integers cannot be 6, similarly $k \neq -3$).
Thus, $x=28, y=17$ or $x=17, y=28$.
When the digits in the odd positions are determined, the digits in the even positions are also determined, and vice versa.
(1) There are 2 solutions for the sum of 5 digits in the odd positions being 17: $\{1,2,3,4,7\}, \{1,2,3,5,6\}$.
(2) There are 9 solutions for the sum of 4 digits in the even positions being 17:
$$
\{1,2,5,9\}, \{1,2,6,8\}, \{1,3,4,9\}, \{1,3,5,8\}, \{1,3,6,7\}, \{1,4,5,7\}, \{2,3,4,8\}, \{2,3,5,7\}, \{2,4,5,6\}
$$

In total, there are 11 different allocations of digits for the odd and even positions, and each allocation produces $5! \times 4!$ nine-digit numbers that are divisible by 11. Therefore, there are $11 \times 5! \times 4! = 31680$ such nine-digit numbers.