An electronic device comprising a camera module and a driving device, the electronic device defining a channel, and the driving device comprising: a driving board, fixedly connected with the camera module and comprising a rack; a driving motor, comprising an output shaft mounted with a driving gear; and a driven gear, meshed with both of the driving gear and the rack, wherein a diameter of the driven gear is greater than a diameter of the driving gear; wherein the driving motor is configured to drive the driving board to move along a direction from the channel to an outside of the electronic device through rotation of the driving gear and rotation of the driven gear, thereby to drive the camera module from being in the channel to the outside of the electronic device, wherein the driving device drives the driving board and the camera module to move in a direction perpendicular to a display screen (12, 22, 32, 42) of the electronic device; wherein the driving device further comprises a first transmission gear and a second transmission gear, the first transmission gear is meshed with the second transmission gear; a diameter of the first transmission gear is smaller than a diameter of the second transmission gear; the first transmission gear is meshed with the driving gear, and the diameter of the first transmission gear is greater than the diameter of the driving gear; the second transmission gear is meshed with the driven gear, and the diameter of the second transmission gear is smaller than the diameter of the driven gear; and wherein the electronic device further comprises a moving device connected with the camera module, and the moving device is configured to further move the camera module, after being moved by the driving device to the outside of the electronic device, to an outer periphery of the electronic device. a driving board, fixedly connected with the camera module and comprising a rack; a driving motor, comprising an output shaft mounted with a driving gear; and a driven gear, meshed with both of the driving gear and the rack, wherein a diameter of the driven gear is greater than a diameter of the driving gear; wherein the driving motor is configured to drive the driving board to move along a direction from the channel to an outside of the electronic device through rotation of the driving gear and rotation of the driven gear, thereby to drive the camera module from being in the channel to the outside of the electronic device, wherein the driving device drives the driving board and the camera module to move in a direction perpendicular to a display screen (12, 22, 32, 42) of the electronic device; wherein the driving device further comprises a first transmission gear and a second transmission gear, the first transmission gear is meshed with the second transmission gear; a diameter of the first transmission gear is smaller than a diameter of the second transmission gear; the first transmission gear is meshed with the driving gear, and the diameter of the first transmission gear is greater than the diameter of the driving gear; the second transmission gear is meshed with the driven gear, and the diameter of the second transmission gear is smaller than the diameter of the driven gear; and wherein the electronic device further comprises a moving device connected with the camera module, and the moving device is configured to further move the camera module, after being moved by the driving device to the outside of the electronic device, to an outer periphery of the electronic device.