An X-ray device includes a casing, an X-ray generator, a zoom ring-like object and an elastic connecting assembly. The casing has a storage space. The X-ray generator is disposed on the casing and located in the storage space. One end of the zoom ring-like object is connected to the X-ray generator. One end of the elastic connecting assembly is connected to the X-ray generator or the zoom ring-like object, and another end of the elastic connecting assembly is connected to the casing, such that the zoom ring-like object or both the zoom ring-like object and the X-ray generator are inclinable relative to the casing.