An electronic device has a first body; a second body; a rotating device rotatably connecting the first body and the second body; and an enclosing mechanism enclosing at least a part of the rotating device.