An electronic device comprising: a housing , wherein the housing is provided with an accommodating space and a first opening communicated with the accommodating space ; a side wall of the accommodating space comprises a first sub side wall and a second sub side wall that are opposite each other, both the first sub side wall and the second sub side wall are provided with a rolling body , a spiral telescopic spring and a guide piece ; wherein the guide piece comprises a rod portion and a limiting cap that are connected, the rod portion extends into the spiral telescopic spring , the limiting cap is in limiting fit with an end portion of the spiral telescopic spring , and the limiting cap is in rotational contact with the rolling body ; wherein a surface of the limiting cap in rotational contact with the rolling body is mutually perpendicular with an axis of the rod portion ; a functional module , wherein the functional module is movably disposed in the accommodating space ; and a drive mechanism, wherein the drive mechanism is disposed in the housing , the drive mechanism is connected with the functional module , and the drive mechanism drives the functional module to retract into the accommodating space through the first opening , or drives at least portion of the functional module to extend out of the accommodating space ; wherein during movement of the functional module relative to the side wall of the accommodating space , the rolling body is in rotational contact with the functional module , and an extending direction of the side wall is parallel to a moving direction of the functional module . a housing , wherein the housing is provided with an accommodating space and a first opening communicated with the accommodating space ; a side wall of the accommodating space comprises a first sub side wall and a second sub side wall that are opposite each other, both the first sub side wall and the second sub side wall are provided with a rolling body , a spiral telescopic spring and a guide piece ; wherein the guide piece comprises a rod portion and a limiting cap that are connected, the rod portion extends into the spiral telescopic spring , the limiting cap is in limiting fit with an end portion of the spiral telescopic spring , and the limiting cap is in rotational contact with the rolling body ; wherein a surface of the limiting cap in rotational contact with the rolling body is mutually perpendicular with an axis of the rod portion ; a functional module , wherein the functional module is movably disposed in the accommodating space ; and a drive mechanism, wherein the drive mechanism is disposed in the housing , the drive mechanism is connected with the functional module , and the drive mechanism drives the functional module to retract into the accommodating space through the first opening , or drives at least portion of the functional module to extend out of the accommodating space ; wherein during movement of the functional module relative to the side wall of the accommodating space , the rolling body is in rotational contact with the functional module , and an extending direction of the side wall is parallel to a moving direction of the functional module . <EOS>