A computer enclosure includes a base (10), a cover (30), and a connecting device (40). The connecting device pivotably connects the cover to the base. The connecting device includes a first lever (42), a second lever (44) and a supporting arm (46). The second lever can be stopped by the first lever, for positioning the cover when the cover is in an open position.