A cap structure including a cap body, a glass and a connecting unit for connecting the cap body with the glass. The cap body has a peak section outward extending from a part of the periphery of the cap body. At least one magnetic member is movably inlaid in the peak section. The connecting unit includes a pivot seat and a pivot block pivotally connected with the pivot seat. At least one magnetic member is disposed in one end of the pivot seat opposite to the pivot block, whereby the magnetic member of the peak section and the magnetic member of the pivot seat can attract each other. The glass is fixedly connected with one end of the pivot block opposite to the pivot seat.