The compact tetraquark states with fully heavy quark contents $QQbar Qbar Q$ are studied as the bound states of the diquark-antidiquark within the Bethe-Salpeter framework. The (anti)diquark masses and form factors used are the same as we calculated the doubly heavy baryons in a previous work. Under the instantaneous approximation, the three-dimensional (Bethe-)Salpeter equation of the tetraquarks is derived and solved numerically to obtain the corresponding mass spectra and wave functions of the tetraquarks with $J^{PC}=0^{++}$, $1^{+-}$, and $2^{++}$. Our results show that the three ground states of $ccbar cbar c$ locate in the mass range of $6.4sim6.5$GeV, and the $bbbar bbar b$ states in mass range of $19.2sim19.3$GeV. The obtained relativistic wave functions naturally include the mixing effects from the possible $D$,(or $G$) partial waves, and then can be further used to do precise calculations of the tetraquark decays. Based on the obtained results, the LHCbs observation $X(6900)$ is less likely to be the ground states of compact $ccbar cbar c$ tetraquarks but might be the first or second excited states. In addition, a widely used propagator-like form factor is also investigated and discussed.