5. As shown in Figure 3, in quadrilateral $A B C D$, $\angle B A D=$ $90^{\circ}, A B=B C=\tan 60^{\circ}$, $A C=3, A D=\frac{3}{2}$. Then the length of $C D$ is ( ).
(A) $2 \sqrt{2}$
(B) 2
(C) $\frac{3 \sqrt{3}}{2}$
(D) $\frac{3 \sqrt{2}}{2}$
5. C.

As shown in Figure 10, construct
$$
B E \perp A C, D F \perp A C,
$$

with the feet of the perpendiculars at points $E$ and $F$. Then
$$
\begin{array}{c}
A E=E C=\frac{3}{2} \\
\Rightarrow \cos \angle B A E \\
=\frac{A E}{A B}=\frac{\sqrt{3}}{2} \\
\Rightarrow \angle B A C=30^{\circ} \Rightarrow \angle D A F=60^{\circ} \\
\Rightarrow A F=\frac{3}{2} \cos 60^{\circ}=\frac{3}{4}, \\
D F=\frac{3}{2} \sin 60^{\circ}=\frac{3 \sqrt{3}}{4} \Rightarrow C F=\frac{9}{4} .
\end{array}
$$

In the right triangle $\triangle C F D$,
$$
C D=\sqrt{\left(\frac{9}{4}\right)^{2}+\left(\frac{3 \sqrt{3}}{4}\right)^{2}}=\frac{3 \sqrt{3}}{2} \text {. }
$$