Page image closing method, device, electronic device and storage medium

Using CSS animation technology to rotate and stretch page images based on predetermined strategies, the problem of terminal difficulty in supporting animation effects is solved, and the universal and realistic display of the inhaled page closing effect is achieved.

CN111796887BActive Publication Date: 2024-09-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202010130032.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-28
Publication Date
2024-09-20
Estimated Expiration
2040-02-28

AI Technical Summary

Technical Problem

It is difficult for some terminals to support animation effects, resulting in inconsistent display effects when the page is closed, and posing challenges to the terminal's execution capabilities.

Method used

Use CSS to rotate and stretch the target page image based on predetermined strategies, and use CSS animation to achieve the inhaled page closing effect, including rotating, stretching, and shortening the page image centered on the target position, ensuring the universal applicability of the page on different terminals.

Benefits of technology

It improves the universality of the inhaled page closing animation, reduces the requirements on the terminal system's adaptability, avoids excessive burden on the terminal's computing power, and achieves a realistic page closing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111796887B
    Figure CN111796887B
Patent Text Reader

Abstract

The present disclosure proposes a page image closing method, device, electronic device and storage medium, and relates to the field of computer technology. A page image closing method disclosed in the present disclosure includes: taking the target position of the target page closing as the center, rotating and stretching the target page image based on a predetermined strategy through CSS; after the width of the target page image in the first direction is less than or equal to the predetermined contraction width, shortening the width of the target page image in the second direction with the target position as the vertex through CSS, until the width in the second direction is less than or equal to the target closing width, and closing the target page image; wherein the first direction is perpendicular to the second direction. Through such a method, it is possible to achieve a suction-type closing effect centered on the target position through page rotation, stretching, and shortening operations based on CSS, realize the application of the suction-type page closing effect on HTML pages, and improve the universality of the suction-type page closing animation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a page image closing method, device, electronic device and storage medium. Background Art

[0002] In order to improve the dynamic display effect of the page and provide a realistic and three-dimensional display experience, some computers with certain systems will add animation effects when closing the window. However, due to differences in the underlying systems and terminal operating capabilities, some terminals are difficult to support some animation effects, or pose a greater challenge to the terminal's execution capabilities. Summary of the invention

[0003] One object of the present disclosure is to improve the universality of the suction-type page closing animation.

[0004] According to one aspect of some embodiments of the present disclosure, a page image closing method is proposed, comprising: after obtaining an instruction to close a target page: taking a target position for closing the target page as the center, rotating and stretching the target page image based on a predetermined strategy through CSS (Cascading Style Sheets); after the width of the target page image in a first direction is less than or equal to a predetermined contraction width, shortening the width of the target page image in a second direction with the target position as the vertex through CSS until the width in the second direction is less than or equal to the target closing width, and closing the target page image; wherein the first direction is perpendicular to the second direction.

[0005] In some embodiments, after obtaining an instruction to close the target page, the page image closing method also includes: determining a target position for closing the target page, the target position including a predetermined position, a trigger position for triggering the expansion of the target page, or a display position of the category to which the target page belongs on the previous level page.

[0006] In some embodiments, rotating and stretching the target page image based on a predetermined strategy includes: flipping the target page image at a predetermined rate with one side of the target page image as the axis, and synchronously rotating the target page image around an axis perpendicular to the screen at the target position; stretching the target page image during the rotation process so that the target page image gradually enlarges from the target position to the side away from the target position.

[0007] In some embodiments, rotating and stretching the target page image based on a predetermined strategy includes: calling a first CSS animation to rotate and stretch the target page image, so that the target page image gradually changes from an initial state to a first stage state, the first stage state being a state in which the width of the target page image reaches a predetermined first width and the target page image rotates to a predetermined first angle; calling a second CSS animation to rotate and stretch the target page image, so that the target page image gradually changes from the first stage state to a second stage state, the first stage state being a state in which the width of the target page image shrinks to a predetermined shrinkage width; shortening the width of the target page image in the second direction with the target position as the vertex includes: calling a third CSS animation to shorten the target page image, so that the target page image gradually changes from the second stage state to a closed state.

[0008] In some embodiments, the target page image is rotated, stretched, and shortened by configuring the perspective, rotation, and transform-origin parameters of the transform attribute in CSS.

[0009] In some embodiments, the target page image is configured so that content that overflows the screen is not visible during the rotation and stretching process.

[0010] In some embodiments, the duration of the operation of rotating and stretching the target page based on a predetermined strategy is a first predetermined duration; the duration of shortening the width of the target page image in the second direction with the target position as the vertex is a second predetermined duration; the sum of the first predetermined duration and the second predetermined duration is the predetermined animation duration.

[0011] In some embodiments, after obtaining an instruction to close the target page, the page image closing method also includes: capturing the current interface image of the target page; closing the target page, and displaying the current interface image as the target page image to perform operations of rotating and stretching the target page image.

[0012] In some embodiments, the first direction is along the longitudinal direction of the screen, and the second direction is along the transverse direction.

[0013] In some embodiments, the first direction is along the horizontal direction of the screen, and the second direction is along the vertical direction.

[0014] Through this method, it is possible to achieve a suction-type closing effect centered on a target position through page rotation, stretching, and shortening operations based on CSS, thereby realizing the application of the suction-type page closing effect on HTML (HyperText Markup Language) pages and improving the universality of the suction-type page closing animation.

[0015] According to one aspect of some embodiments of the present disclosure, a page image closing device is proposed, comprising: a first processing unit, configured to rotate and stretch a target page image based on a predetermined strategy with a target position for closing the target page as the center; a second processing unit, configured to shorten the width of the target page image in a second direction with the target position as the vertex after the width of the target page image in a first direction is less than or equal to a predetermined contraction width, until the width in the second direction is less than or equal to the target closing width, thereby closing the target page image; wherein the first direction is perpendicular to the second direction.

[0016] In some embodiments, the page image closing device also includes: a target position acquisition unit, which is configured to determine the target position for closing the target page and trigger the first processing unit after obtaining an instruction to close the target page. The target position includes a predetermined position, a trigger position for triggering the expansion of the target page, or a display position of the category to which the target page belongs on the previous level page.

[0017] In some embodiments, the page image closing device also includes: a screenshot unit, which is configured to capture the current interface image of the target page after obtaining an instruction to close the target page; close the target page, display the current interface image as the target page image, and trigger the first processing unit.

[0018] According to one aspect of some embodiments of the present disclosure, an electronic device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the above page image closing methods based on instructions stored in the memory.

[0019] Such an electronic device can achieve a suction-type closing effect centered on a target position through page rotation, stretching, and shortening operations based on CSS, realize the application of the suction-type page closing effect on HTML pages, and improve the universality of the suction-type page closing animation.

[0020] According to one aspect of some embodiments of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the steps of any one of the page image closing methods described above are implemented.

[0021] By executing instructions on such a computer-readable storage medium, it is possible to achieve a suction-type closing effect centered on a target position through page rotation, stretching, and shortening operations based on CSS, thereby realizing the application of the suction-type page closing effect on HTML pages and improving the universality of the suction-type page closing animation. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0023] Figure 1 The present invention is a flowchart of some embodiments of the page image closing method disclosed herein.

[0024] Figure 2A Schematic diagrams of some embodiments of image rotation in the page image closing method of the present disclosure.

[0025] Figure 2B Schematic diagrams of some embodiments of image stretching in the page image closing method disclosed in the present invention.

[0026] Figure 2C Schematic diagrams of some embodiments of image shortening in the page image closing method disclosed in the present invention.

[0027] Figure 3 Flow charts of other embodiments of the page image closing method disclosed in the present invention.

[0028] Figure 4A Schematic diagrams of some embodiments of the initial state in the page image closing method disclosed in the present invention.

[0029] Figure 4B Schematic diagram of some embodiments of the first stage state in the page image closing method disclosed in the present invention.

[0030] Figure 4C Schematic diagram of some embodiments of the second stage state in the page image closing method disclosed in the present invention.

[0031] Figure 5 Schematic diagrams of some embodiments of the page image closing device disclosed in the present invention.

[0032] Figure 6 Schematic diagrams of some embodiments of the electronic device disclosed herein.

[0033] Figure 7 Schematic diagrams of other embodiments of the electronic device disclosed herein. DETAILED DESCRIPTION

[0034] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments.

[0035] The flowcharts of some embodiments of the page image closing method disclosed in the present invention are as follows: Figure 1 shown.

[0036] In step 101, after obtaining an instruction to close the target page, the target page image is rotated and stretched based on a predetermined strategy by CSS, with the target position of the target page closing as the center. The target position can be the position where the page disappears, that is, the suction point position of the suction effect. In some embodiments, the target position can be pre-specified, or it can be a trigger position that triggers the target page to expand, or the display position of the target page category on the previous page, etc.

[0037] In step 102, it is determined whether the width of the target page image in the first direction is less than or equal to a predetermined shrink width. If it is less than or equal to the predetermined shrink width, step 103 is executed, otherwise step 101 is continued. In some embodiments, the predetermined shrink width may be 1 to 10 pixels, so as to achieve the effect of shrinking the page image into a linear shape before shrinking it.

[0038] In step 103, the width of the target page image in the second direction is shortened by CSS with the target position as the vertex until the width in the second direction is less than or equal to the target closing width, and the target page image is closed, wherein the first direction is perpendicular to the second direction. In some embodiments, if the first direction is along the longitudinal direction of the screen, the second direction is the transverse direction. In some embodiments, if the first direction is along the transverse direction of the screen, the second direction is the longitudinal direction.

[0039] In the related art, the suction-type page closing effect is implemented by using canvas in Android native projects and imitated by using UIWebview on iOS mobile phones. Through the method in the above embodiment, the suction-type closing effect centered on the target position can be achieved based on CSS through page rotation, stretching, and shortening operations, and the application of the suction-type page closing effect based on CSS on HTML pages is realized, which improves the universality of the suction-type page closing animation.

[0040] In some embodiments, the page image rotation operation may include: taking one side of the target page image as an axis, flipping the target page image at a predetermined rate, and synchronously rotating the target page image around an axis perpendicular to the screen at the target position. Figure 2A As shown, after determining the target position of the page (i.e., the center point in the figure), we first flip the page image along the Z axis (the horizontal side of the page image rectangle is identified as the X axis, and the vertical side as the Y axis). After flipping upward in Figure a, we run the rotation action around the center point in Figure b. The two operations are performed simultaneously to achieve the required rotation action in Figure c.

[0041] In some embodiments, the target page image may be stretched during the rotation of the page image, so that the target page image is gradually enlarged from the target position to the side away from the target position. Figure 2BAs shown in the image on the left, the fan-shaped deformation effect of the page is achieved by enlarging the page or changing the width and height during the rotation. As the rotation stretches, the width of the fan-shaped page will gradually shrink, such as Figure 2B As shown in the image on the right, the page image gradually shrinks from the space between the two No. 1 lines to the space between the two No. 2 lines, and then to the space between the two No. 3 lines.

[0042] In some embodiments, the page overflow attribute may be configured as hidden, and the content of the overflow portion is trimmed to be invisible, thereby avoiding display confusion due to overflowing the screen.

[0043] In some embodiments, after being rotated to a predetermined position and stretched to a predetermined extent, the target page image is shortened by CSS with the target position as the vertex. Figure 2C As shown, when the page is shrunk to a linear shape, the linear web page is shortened until it disappears.

[0044] Through the method in the above embodiment, the page can be deformed and closed by rotating, stretching, and shortening operations, thereby presenting the effect of the page being sucked in. Such a solution can be applied to the closing of application interfaces, new user guide pop-ups, advertising pop-ups, and prompt pop-ups. It is based on CSS, reduces the requirements for the adaptability of the terminal system, does not impose too much burden on the terminal computing power, and improves universality.

[0045] In some embodiments, in order to avoid the text, pictures, etc. on the page image failing to change in accordance with the rotation and stretching proportions during the closing process, a screenshot of the page can be taken first, and the page screenshot can be rotated, stretched, and shortened to further improve the realism of the page display effect and reduce the burden of page style processing.

[0046] Flow charts of other embodiments of the page image closing method disclosed in the present invention are as follows: Figure 3 shown.

[0047] In step 301, after obtaining an instruction to trigger closing of a target page, a current interface image of the target page is captured.

[0048] In step 302, the target page is closed and the current interface image is displayed as the target page.

[0049] In step 303, the target position in the target page is obtained. The target position can be a predetermined position, a trigger position that triggers the target page to be expanded, or a display position of the category to which the target page belongs on the previous page. Figure 4A As shown, when the user clicks skip, the mask page is saved to the help center position in the upper right corner, and the help center position can be the target position.

[0050] In some embodiments, when the user clicks to trigger the page closing, the CSS animation animation:guideClose 1.5s ease-out forwards can be called; an animation is set in the guideClose class name, and the execution time of this animation is a predetermined duration, such as 1.5 seconds shown in the call statement. This 1.5-second animation is the duration of the suction-type closing effect, that is, the sum of the first predetermined duration of the operation of rotating and stretching the target page based on a predetermined strategy, and the second predetermined duration of shortening the width of the target page image in the second direction with the target position as the vertex.

[0051] In some embodiments, the target position can be pre-specified, using transform-origin and absolute positioning in CSS to determine the target position:

[0052] According to the expected suction point in the design, set the target position of the disappearing interface 'transform-origin'. Use the top\bottom\right\left\center properties in combination with the absolute positioning of the page to set the target position of the page deformation.

[0053] In some embodiments, in an interface where the number of required suction points is less than a predetermined value (eg, 5 points), or a page has only one click-to-close position, the point can be directly determined using the origin and absolute positioning as the target position.

[0054] In other embodiments, JavaScript can be used to calculate the trigger position for the target page to expand, or the display position of the target page's category on the previous page as the target position: an id is added to the suction point target, the position of the point is calculated in the page (such as $event.offsetLeft, etc.), the center point of the position is taken out, and the 'transform-origin' origin position of the page to be closed is set to this value.

[0055] In some embodiments, steps 301 and 303 are executed in any order and can be executed in parallel.

[0056] In step 304, the target page image is rotated and stretched by CSS with the target position where the target page is closed as the center.

[0057] In some embodiments, the first CSS animation may be called first to rotate and stretch the target page image, so that the target page image gradually changes from the initial state to the first stage state, where the width of the target page image reaches a predetermined first width and the target page image rotates to a predetermined first angle. For example, when the following CSS code is run, the page changes from a flattened state along the origin 'transform-origin: top;', changes the page width, rotates a certain angle through the X-axis and Z-axis, and pushes the "viewport" (camera) away with the perspective attribute, forming a fan-shaped triangle folded state:

[0058]

[0059]

[0060] The page starts from the initial state shown in the code 0% above (such as Figure 4A ), gradually changes from the first stage state shown in 30% of the above code (as shown Figure 4B shown).

[0061] In some embodiments, after the page image reaches the first stage state, the second CSS animation is called to rotate and stretch the target page image, so that the target page image gradually changes from the first stage state to the second stage state, and the first stage state is a state in which the width of the target page image shrinks to a predetermined shrinkage width. For example, run the following code to further change the page width to 1px and rotate the X-axis angle to change it from wide to narrow:

[0062]

[0063] The page changes from the first stage state shown in 30% of the above code (such as Figure 4B ), gradually changes from the second stage state shown in 60% of the above code (as shown Figure 4C as shown in the upper figure).

[0064] In step 305, it is determined whether the target page image has completely reached the second stage state. If it has reached the second stage state, step 306 is executed, otherwise, step 304 is continued.

[0065] In step 306, in some embodiments, a third CSS animation is called to shorten the target page image so that the target page image gradually changes from the second stage state to the closed state. For example, run the following code:

[0066]

[0067] The page is in the second stage state shown in 60% of the above code (such as Figure 4CThe gradient (the intermediate process is shown in the lower figure of 4C) is the closed state shown in the above code 100%. In the closed state, the width and height of the image are both 0, and the rotation angle around the Z axis is also 0°.

[0068] Through this method, the transform attributes perspective, rotate and transform-origin in CSS styles and CSS animations are used to realize the deformation, flipping and deformation positioning of the page, and finally the effect of the page being sucked in and closed is achieved, and the animation display of the suck-in-style closing page in the HTML page is achieved, which expands the application scope of the suck-in-style closing page effect.

[0069] Schematic diagrams of some embodiments of the page image closing device disclosed in the present invention are as follows: Figure 5 shown.

[0070] After obtaining the instruction to close the target page, the first processing unit 501 can rotate and stretch the target page image based on a predetermined strategy through CSS with the target position of the target page as the center. The target position can be the position where the page disappears, that is, the suction point position of the suction effect. In some embodiments, the target position can be pre-specified, or it can be a trigger position that triggers the expansion of the target page, or the display position of the target page category on the previous page.

[0071] After the width of the target page image in the first direction is less than or equal to the predetermined shrink width, the second processing unit 502 can shorten the width of the target page image in the second direction by using CSS with the target position as the vertex until the width in the second direction is less than or equal to the target closing width, and close the target page image, wherein the first direction is perpendicular to the second direction. In some embodiments, if the first direction is along the longitudinal direction of the screen, the second direction is the transverse direction. In some embodiments, if the first direction is along the transverse direction of the screen, the second direction is the longitudinal direction.

[0072] Such a page image closing device can achieve a suction-type closing effect centered on a target position based on CSS through page rotation, stretching, and shortening operations, thereby realizing the application of the suction-type page closing effect on HTML pages and improving the universality of the suction-type page closing animation.

[0073] In some embodiments, Figure 5 As shown, the page image closing device may also include a target position acquisition unit 503 that can determine the target position of the target page after obtaining the instruction to close the target page, and trigger the first processing unit. In some embodiments, the target position includes a predetermined position, a trigger position that triggers the expansion of the target page, or a display position of the category to which the target page belongs on the previous page.

[0074] If the target position is pre-specified, use transform-origin and absolute positioning in CSS to specify it. According to the expected position of the suction point in the design draft, set the target position of the disappearing interface 'transform-origin'. Use the top\bottom\right\left\center (top\bottom\right\left\center) properties in combination with the absolute positioning of the page to set the target position of the page deformation.

[0075] In some embodiments, JavaScript can be used to calculate the trigger position for the target page to expand, or the display position of the target page's category on the previous page as the target position: an id is added to the suction point target, the position of the point is calculated in the page (such as $event.offsetLeft, etc.), the center point of the position is taken out, and the 'transform-origin' origin position of the page to be closed is set to this value.

[0076] Such a device can realize confirmation of the position of page inhalation, improve the flexibility and credibility of the page inhalation effect, and further improve the user experience.

[0077] In some embodiments, Figure 5 As shown, the page image closing device also includes: a screenshot unit 504, which can capture the current interface image of the target page after obtaining the instruction to trigger the closing of the target page, and then close the target page, display the current interface image as the target page, and trigger the first processing unit to start executing the operation of rotating and stretching the target page image through CSS. Such a device can avoid the text, pictures, etc. on the page image from being distorted due to the failure to change in the proportion of rotation and stretching during the closing process, further improve the authenticity of the page display effect, and reduce the burden of page style processing.

[0078] A schematic diagram of the structure of an embodiment of the electronic device disclosed in the present invention is as follows Figure 6 As shown. The page image closing device includes a memory 601 and a processor 602. Wherein: the memory 601 can be a disk, a flash memory or any other non-volatile storage medium. The memory is used to store the instructions in the corresponding embodiment of the page image closing method described above. The processor 602 is coupled to the memory 601 and can be implemented as one or more integrated circuits, such as a microprocessor or a microcontroller. The processor 602 is used to execute the instructions stored in the memory, which can improve the universality of the suction-type page closing animation.

[0079] In one embodiment, it is also possible to Figure 7As shown, the electronic device 700 includes a memory 701 and a processor 702. The processor 702 is coupled to the memory 701 via a BUS bus 703. The page image closing device 700 can also be connected to an external storage device 705 via a storage interface 704 to call external data, and can also be connected to a network or another computer system (not shown) via a network interface 706. No further detailed description will be given here.

[0080] In this embodiment, the memory stores data instructions, and the processor processes the instructions, so that the universality of the suction-type page closing animation can be improved.

[0081] In another embodiment, a computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the method in the corresponding embodiment of the page image closing method. It should be understood by those skilled in the art that the embodiments of the present disclosure can be provided as methods, devices, or computer program products. Therefore, the present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0082] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0083] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0085] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0086] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present disclosure rather than to limit it. Although the present disclosure has been described in detail with reference to the preferred embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present disclosure can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present disclosure, which should be included in the scope of the technical solution for protection of the present disclosure.

Claims

1. A page image closing method, comprising: After receiving the instruction to close the target page: The target page image is rotated and stretched based on a predetermined strategy by using a cascading style sheet (CSS) with the target position where the target page is closed as the center, including: taking one side of the target page image as the axis, flipping the target page image at a predetermined rate, and synchronously rotating the target page image around an axis perpendicular to the screen at the target position; stretching the target page image during the rotation process so that the target page image is gradually enlarged from the target position to a side away from the target position; After the width of the target page image in the first direction is less than or equal to the predetermined shrinkage width, shortening the width of the target page image in the second direction with the target position as the vertex through the CSS until the width in the second direction is less than or equal to the target closing width, and closing the target page image; The first direction is perpendicular to the second direction.

2. The method according to claim 1, wherein: After receiving the instruction to close the target page, it also includes: A target position for closing a target page is determined, wherein the target position includes a predetermined position, a trigger position for triggering the target page to be expanded, or a display position of a category to which the target page belongs on a previous level page.

3. The method according to claim 1 or 2, wherein: The rotating and stretching target page image based on a predetermined strategy includes: Calling a first CSS animation to rotate and stretch the target page image, so that the target page image gradually changes from an initial state to a first stage state, wherein the first stage state is a state in which the width of the target page image reaches a predetermined first width and the target page image rotates to a predetermined first angle; Calling a second CSS animation to rotate and stretch the target page image, so that the target page image gradually changes from the first stage state to the second stage state, wherein the second stage state is a state in which the width of the target page image is shrunk to a predetermined shrunk width; The method of shortening the width of the target page image in the second direction with the target position as the vertex comprises: The third CSS animation is called to shorten the target page image, so that the target page image gradually changes from the second stage state to the closed state.

4. The method according to claim 1, wherein: The target page image is rotated, stretched, and shortened by configuring the perspective, rotation, and transformation origin transform-origin parameters of the transformation transform attribute in CSS.

5. The method according to claim 1 or 2, wherein: Configure the target page image so that content that overflows the screen is not visible during rotation and stretching.

6. The method according to claim 1, wherein: The duration of the operation of rotating and stretching the target page based on the predetermined strategy is a first predetermined duration; The duration of shortening the width of the target page image in the second direction with the target position as the vertex is a second predetermined duration; The sum of the first predetermined duration and the second predetermined duration is the predetermined animation duration.

7. The method according to claim 1, wherein: After receiving the instruction to close the target page, it also includes: Capture the current interface image of the target page; The target page is closed, and the current interface image is displayed as the target page image so as to perform operations of rotating and stretching the target page image.

8. The method according to claim 1, wherein: The first direction is along the longitudinal direction of the screen, and the second direction is along the transverse direction; or The first direction is along the horizontal direction of the screen, and the second direction is along the vertical direction.

9. A page image closing device, comprising: The first processing unit is configured to rotate and stretch the target page image based on a predetermined strategy with the target position where the target page is closed as the center, including: flipping the target page image at a predetermined rate with one side of the target page image as the axis, and synchronously rotating the target page image around an axis perpendicular to the screen at the target position; stretching the target page image during the rotation process so that the target page image is gradually enlarged from the target position to a side away from the target position; The second processing unit is configured to shorten the width of the target page image in the second direction with the target position as a vertex after the width of the target page image in the first direction is less than or equal to a predetermined shrinkage width, until the width in the second direction is less than or equal to a target closing width, and close the target page image; The first direction is perpendicular to the second direction.

10. The apparatus according to claim 9, further comprising: The target position acquisition unit is configured to determine the target position for closing the target page and trigger the first processing unit after obtaining an instruction to close the target page. The target position includes a predetermined position, a trigger position for triggering the expansion of the target page, or a display position of the category to which the target page belongs on the previous level page.

11. The apparatus according to claim 9, further comprising: A screenshot unit is configured to capture a current interface image of the target page after receiving an instruction to close the target page; The target page is closed, the current interface image is displayed as the target page image, and the first processing unit is triggered.

12. An electronic device comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the method according to any one of claims 1 to 8 based on instructions stored in the memory.

13. A computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Page display method and device

    CN103593114A

  • Web page content 3D process switching method

    CN107766423A

  • Page switching intelligent animation effect application method and system

    CN108536832A

  • Webpage display method and device

    CN110362304A

  • Picture display method and device and terminal

    CN110673775A