An electronic device, comprising a curved display, a back cover, a frame, and a button assembly, wherein the curved display is disposed opposite the back cover, edges of the curved display are bent toward the back cover, the frame is located between the curved display and the back cover, the curved display, the back cover, and the frame enclose an accommodation space, the frame is provided with a communication space, and the communication space allows the accommodation space to communicate with the outside of the electronic device; and the button assembly comprises a switching member and a pressing member, the switching member is located in the accommodation space, the pressing member comprises a first end portion and a second end portion, the second end portion is located in the accommodation space, at least part of the second end portion is disposed opposite the switching member, the first end portion is exposed to the outside of the electronic device through the communication space, a Z-direction distance of the first end portion from the back cover is a first distance, a Z-direction distance of the second end portion from the back cover is a second distance, and the first distance is less than the second distance; wherein the switching member comprises a switch and a flexible circuit board, the flexible circuit board comprises a first section and a second section, the second section is bent and connected to the first section, the switch is mounted to the first section and is electrically connected to the first section, the second end portion is disposed opposite the switch, an included angle between the first section and a first direction ranges from 60° to 120°, and the first direction is a direction in which the second end portion faces the first end portion; wherein the switching member further comprises a fastening bracket, the fastening bracket comprises a fastening portion and a bearing portion connected to the fastening portion, the fastening portion is fixedly connected to the frame, and the bearing portion is fixedly connected to a surface of the first section that is away from the switch; wherein the switching member further comprises a fastener, and the fastener locks the fastening portion to the frame; and wherein the fastener comprises a first end and a second end that are disposed opposite each other, the first end is an end portion of the fastener that is away from the frame, the second end is an end portion of the fastener that is locked to the frame, a Z-direction distance of the first end from the back cover is a third distance, a Z-direction distance of the second end from the back cover is a fourth distance, and the third distance is less than the fourth distance. the button assembly comprises a switching member and a pressing member, the switching member is located in the accommodation space, the pressing member comprises a first end portion and a second end portion, the second end portion is located in the accommodation space, at least part of the second end portion is disposed opposite the switching member, the first end portion is exposed to the outside of the electronic device through the communication space, a Z-direction distance of the first end portion from the back cover is a first distance, a Z-direction distance of the second end portion from the back cover is a second distance, and the first distance is less than the second distance; wherein the switching member comprises a switch and a flexible circuit board, the flexible circuit board comprises a first section and a second section, the second section is bent and connected to the first section, the switch is mounted to the first section and is electrically connected to the first section, the second end portion is disposed opposite the switch, an included angle between the first section and a first direction ranges from 60° to 120°, and the first direction is a direction in which the second end portion faces the first end portion; wherein the switching member further comprises a fastening bracket, the fastening bracket comprises a fastening portion and a bearing portion connected to the fastening portion, the fastening portion is fixedly connected to the frame, and the bearing portion is fixedly connected to a surface of the first section that is away from the switch; wherein the switching member further comprises a fastener, and the fastener locks the fastening portion to the frame; and wherein the fastener comprises a first end and a second end that are disposed opposite each other, the first end is an end portion of the fastener that is away from the frame, the second end is an end portion of the fastener that is locked to the frame, a Z-direction distance of the first end from the back cover is a third distance, a Z-direction distance of the second end from the back cover is a fourth distance, and the third distance is less than the fourth distance.