An electronic device, comprising a flexible display, a first housing, a second housing, a first elastic component, and a shaft, wherein the flexible display comprises a first non-bending part, a bending part, and a second non-bending part that are sequentially arranged; the first housing and the second housing are respectively located on two sides of the shaft; the first housing is fixedly connected to the first non-bending part, and the second housing is fixedly connected to the second non-bending part; the first elastic component is located between the shaft and the first housing, the first elastic component is rotatably connected to the shaft, and the first elastic component is fixedly connected to the first housing; a first mechanical part abuts against a second mechanical part, wherein the first mechanical part is a part of the first elastic component, and the second mechanical part is a part of the shaft; a compression amount of the first elastic component in a first direction generates an elastic force, and at least a part of the elastic force is transferred to the bending part through the first housing and the first non-bending part, wherein the first direction is perpendicular to a length extension direction of the shaft, and the first direction is parallel to the first housing; when the electronic device is in a flattened state, a first portion of the first mechanical part abuts against a first portion of the second mechanical part, and a compression amount of the first elastic component in the first direction is a first compression amount; the first housing and the first elastic component rotate relative to the shaft, the second housing rotates relative to the shaft, and the electronic device changes from the flattened state to a folded state; when the electronic device is in the folded state, a second portion of the first mechanical part abuts against a second portion of the second mechanical part, and a compression amount of the first elastic component in the first direction is a second compression amount, wherein the second compression amount is less than the first compression amount; and the first portion of the first mechanical part is different from the second portion of the first mechanical part, and/or the first portion of the second mechanical part is different from the second portion of the second mechanical part. the flexible display comprises a first non-bending part, a bending part, and a second non-bending part that are sequentially arranged; the first housing and the second housing are respectively located on two sides of the shaft; the first housing is fixedly connected to the first non-bending part, and the second housing is fixedly connected to the second non-bending part; the first elastic component is located between the shaft and the first housing, the first elastic component is rotatably connected to the shaft, and the first elastic component is fixedly connected to the first housing; a first mechanical part abuts against a second mechanical part, wherein the first mechanical part is a part of the first elastic component, and the second mechanical part is a part of the shaft; a compression amount of the first elastic component in a first direction generates an elastic force, and at least a part of the elastic force is transferred to the bending part through the first housing and the first non-bending part, wherein the first direction is perpendicular to a length extension direction of the shaft, and the first direction is parallel to the first housing; when the electronic device is in a flattened state, a first portion of the first mechanical part abuts against a first portion of the second mechanical part, and a compression amount of the first elastic component in the first direction is a first compression amount; the first housing and the first elastic component rotate relative to the shaft, the second housing rotates relative to the shaft, and the electronic device changes from the flattened state to a folded state; when the electronic device is in the folded state, a second portion of the first mechanical part abuts against a second portion of the second mechanical part, and a compression amount of the first elastic component in the first direction is a second compression amount, wherein the second compression amount is less than the first compression amount; and the first portion of the first mechanical part is different from the second portion of the first mechanical part, and/or the first portion of the second mechanical part is different from the second portion of the second mechanical part.