An electronic device, comprising: a first housing; a second housing that is movable relative to and over the first housing and at least partially overlapping the first housing; a flexible display (320; 1830) at least partially mounted on the second housing and at least partially visually exposed to an exterior of the electronic device, wherein the flexible display (320; 1830) is insertable into an interior of the first housing when the second housing moves relative to the first housing in a first direction, and removable from the interior when the second housing moves relative to the first housing in a second direction; a memory; and at least one processor coupled to the flexible display and the memory, wherein the memory stores instructions configured to, when executed by the at least one processor, cause the at least one processor to: display a screen on a first display area of the flexible display, detect movement of the second housing relative to the first housing in one of the first direction or the second direction, identify whether a resized display area of the flexible display satisfies a predetermined condition, wherein the predetermined condition includes a size of the resized display area being more than a designated size, based on the movement of the second housing detected in the second direction, and based on identifying that the resized display area does not satisfy the predetermined condition, identify a second display area of the flexible display corresponding to a moving distance of the second housing, wherein the resized display area includes the first display area and the second display area, and display a visual effect on at least a portion of the second display area while maintaining the displaying of the screen on the first display area, such that at least the portion of the second display is visually differentiated from the first display area. a first housing; a second housing that is movable relative to and over the first housing and at least partially overlapping the first housing; a flexible display (320; 1830) at least partially mounted on the second housing and at least partially visually exposed to an exterior of the electronic device, wherein the flexible display (320; 1830) is insertable into an interior of the first housing when the second housing moves relative to the first housing in a first direction, and removable from the interior when the second housing moves relative to the first housing in a second direction; a memory; and at least one processor coupled to the flexible display and the memory, wherein the memory stores instructions configured to, when executed by the at least one processor, cause the at least one processor to: display a screen on a first display area of the flexible display, detect movement of the second housing relative to the first housing in one of the first direction or the second direction, identify whether a resized display area of the flexible display satisfies a predetermined condition, wherein the predetermined condition includes a size of the resized display area being more than a designated size, based on the movement of the second housing detected in the second direction, and based on identifying that the resized display area does not satisfy the predetermined condition, identify a second display area of the flexible display corresponding to a moving distance of the second housing, wherein the resized display area includes the first display area and the second display area, and display a visual effect on at least a portion of the second display area while maintaining the displaying of the screen on the first display area, such that at least the portion of the second display is visually differentiated from the first display area. display a screen on a first display area of the flexible display, detect movement of the second housing relative to the first housing in one of the first direction or the second direction, identify whether a resized display area of the flexible display satisfies a predetermined condition, wherein the predetermined condition includes a size of the resized display area being more than a designated size, based on the movement of the second housing detected in the second direction, and based on identifying that the resized display area does not satisfy the predetermined condition, identify a second display area of the flexible display corresponding to a moving distance of the second housing, wherein the resized display area includes the first display area and the second display area, and display a visual effect on at least a portion of the second display area while maintaining the displaying of the screen on the first display area, such that at least the portion of the second display is visually differentiated from the first display area.