Page adaptation method, display terminal and readable storage medium

文档序号:7880 发布日期:2021-09-17 浏览:28次 中文

1. A page adaptation method is characterized by comprising the following steps:

acquiring a first screen resolution of a first terminal, a second screen resolution of a second terminal and an original image resolution of a target webpage when the first terminal displays;

determining a first root element font size according to the first screen resolution, and determining a second root element font size according to the second screen resolution;

and determining the image resolution of the target webpage when the target webpage is displayed at the second terminal according to the first root element font size, the second root element font size and the original image resolution.

2. The page adaptation method according to claim 1, wherein the step of determining the image resolution of the target web page when displayed at the second terminal based on the first root element font size, the second root element font size and the original image resolution comprises:

determining the scaling of the target webpage when the second terminal displays according to the first root element font size and the second root element font size;

determining the image resolution according to the original image resolution and the scaling.

3. The page adaptation method of claim 1, wherein the step of obtaining the first screen resolution of the first terminal, the second screen resolution of the second terminal, and the original image resolution of the target web page when displayed at the first terminal is preceded by the step of:

loading and displaying a target image;

receiving a setting operation of a hot spot region triggered based on the target image;

and setting at least one hot spot area for the target image according to the setting operation so as to obtain the target webpage.

4. The page adaptation method according to claim 3, wherein the step of setting at least one hot spot region for the target image according to the setting operation comprises:

setting display parameters and jump links of a hot spot area in the target image according to the setting operation, wherein the display parameters comprise shape, rotation angle, position and size;

and generating a hot spot area in the target image according to the display parameter and the jump link.

5. The page adaptation method of claim 4, wherein the step of generating a hot spot region in the target image according to the display parameters and the jump link comprises:

converting a preset hot spot region model into a form corresponding to the shape, the rotation angle and the size;

dragging the converted hot spot region model to the position in the target image, and adding a jump link for the hot spot region model at the position to generate a hot spot region according to the hot spot region model;

after the hot spot area is generated, the display parameter of the generated hot spot area is in a fixed state, and the display parameter of the hot spot area model is in an editing state.

6. The page adaptation method according to claim 4, wherein the step of setting display parameters of a hot spot region in the target image and a jump link according to the setting operation comprises:

setting the shape and the rotation angle according to a first setting operation;

setting the position and the size according to a second setting operation;

and setting the jump link according to a third setting operation.

7. The page adaptation method according to claim 3, wherein after the step of setting at least one hot spot region for the target image according to the setting operation to obtain the target webpage, the method further comprises:

when code copying operation is received, generating a page layout code of the target webpage, and acquiring the type of an application platform required by the target webpage;

converting the page layout code into a target page layout code adapted to the type of application platform to apply the target page layout code to the type of application platform.

8. The page adaptation method of claim 1, wherein the step of obtaining a first screen resolution of the first terminal, a second screen resolution of the second terminal, and an original image resolution of the target web page when displayed at the first terminal is preceded by:

acquiring a first type of the first terminal and a second type of the second terminal;

if the second type is not consistent with the first type, executing the step of acquiring the first screen resolution of the first terminal, the second screen resolution of the second terminal and the original image resolution of the target webpage when the first terminal displays;

and if the second type is consistent with the first type, taking the original image resolution as the image resolution of the target webpage when the target webpage is displayed at the second terminal.

9. A display terminal, characterized in that the display terminal comprises a memory, a processor and a page adaptation program stored in the memory and operable on the processor, and the processor implements the steps of the page adaptation method according to any one of claims 1 to 8 when executing the page adaptation program.

10. A readable storage medium, characterized in that the readable storage medium has stored thereon a page adaptation program, which when executed by a processor implements the steps of the page adaptation method according to any one of claims 1-8.

Background

In order to generate a hyperlink in an image hot spot area to improve convenience of user operation, a link jump function in the image hot spot area is mainly realized by configuring an area (area) tag attribute at present. However, the area tag defines the coordinate position by a coordinate (coords) attribute, and the coordinate point of the hot spot region does not change with the adjustment of the display window. Therefore, the webpage with the hot spot area hyperlink generated through the area tag attribute cannot be adapted to different mobile terminals.

Disclosure of Invention

The invention mainly aims to provide a page adaptation method, a display terminal and a readable storage medium, aiming at enabling the same webpage to be adapted to different mobile terminals so as to improve the display effect of the webpage on different display terminals.

In order to achieve the above object, the present invention provides a page adaptation method, which comprises the following steps:

acquiring a first screen resolution of a first terminal, a second screen resolution of a second terminal and an original image resolution of a target webpage when the first terminal displays;

determining a first root element font size according to the first screen resolution, and determining a second root element font size according to the second screen resolution;

and determining the image resolution of the target webpage when the target webpage is displayed at the second terminal according to the first root element font size, the second root element font size and the original image resolution.

Optionally, the step of determining the image resolution of the target webpage when displayed on the second terminal according to the first root element font size, the second root element font size and the original image resolution includes:

determining the scaling of the target webpage when the second terminal displays according to the first root element font size and the second root element font size;

determining the image resolution according to the original image resolution and the scaling.

Optionally, before the step of obtaining the first screen resolution of the first terminal, the second screen resolution of the second terminal, and the original image resolution of the target webpage when the first terminal displays, the method further includes:

loading and displaying a target image;

receiving a setting operation of a hot spot region triggered based on the target image;

and setting at least one hot spot area for the target image according to the setting operation so as to obtain the target webpage.

Optionally, the step of setting at least one hot spot region for the target image according to the setting operation includes:

setting display parameters and jump links of a hot spot area in the target image according to the setting operation, wherein the display parameters comprise shape, rotation angle, position and size;

and generating a hot spot area in the target image according to the display parameter and the jump link.

Optionally, the step of generating a hot spot region in the target image according to the display parameter and the skip link includes:

converting a preset hot spot region model into a form corresponding to the shape, the rotation angle and the size;

dragging the converted hot spot region model to the position in the target image, and adding a jump link for the hot spot region model at the position to generate a hot spot region according to the hot spot region model;

after the hot spot area is generated, the display parameter of the generated hot spot area is in a fixed state, and the display parameter of the hot spot area model is in an editing state.

Optionally, the step of setting display parameters and jump links of the hot spot region in the target image according to the setting operation includes:

setting the shape and the rotation angle according to a first setting operation;

setting the position and the size according to a second setting operation;

and setting the jump link according to a third setting operation.

Optionally, after the step of setting at least one hot spot region for the target image according to the setting operation to obtain the target webpage page, the method further includes:

when code copying operation is received, generating a page layout code of the target webpage, and acquiring the type of an application platform required by the target webpage;

converting the page layout code into a target page layout code adapted to the type of application platform to apply the target page layout code to the type of application platform.

Optionally, before the step of obtaining the first screen resolution of the first terminal, the second screen resolution of the second terminal, and the original image resolution of the target webpage when the first terminal displays, the method includes:

acquiring a first type of the first terminal and a second type of the second terminal;

if the second type is not consistent with the first type, executing the step of acquiring the first screen resolution of the first terminal, the second screen resolution of the second terminal and the original image resolution of the target webpage when the first terminal displays;

and if the second type is consistent with the first type, taking the original image resolution as the image resolution of the target webpage when the target webpage is displayed at the second terminal.

In addition, in order to achieve the above object, the present invention further provides a display terminal, where the display terminal includes a memory, a processor, and a page adaptation program stored on the processor and capable of running on the processor, and the processor implements the steps of the page adaptation method when executing the page adaptation program.

In addition, to achieve the above object, the present invention further provides a readable storage medium, where a page adaptation program is stored, and the page adaptation program, when executed by a processor, implements the steps of the page adaptation method as described above.

In the embodiment of the invention, by acquiring the first screen resolution of the first terminal, the second screen resolution of the second terminal and the original image resolution of the target webpage when the first terminal displays, the first root element font size can be determined according to the first screen resolution, the second root element font size can be determined according to the second screen resolution, and then the image resolution of the target webpage when the second terminal displays can be determined according to the first root element font size, the second root element font size and the original image resolution. Therefore, different mobile terminals can be automatically adapted according to the font size of the first root element, the font size of the second root element and the resolution of the original image, the situation that different mobile terminals cannot be adapted when the webpage with the image hot spot area hyperlink generated through the area tag attribute is generated is avoided, and the display effect of the target webpage when the target webpage is displayed on different display terminals can be improved.

Drawings

Fig. 1 is a schematic structural diagram of a display terminal of a hardware operating environment according to an embodiment of the present invention;

FIG. 2 is a flowchart illustrating a first embodiment of a page adaptation method according to the present invention;

FIG. 3 is a flowchart illustrating a page adaptation method according to a second embodiment of the present invention;

FIG. 4 is a flowchart illustrating a page adaptation method according to a third embodiment of the present invention;

FIG. 5 is a schematic view of a process involved in an application example of the page adaptation method of the present invention;

FIG. 6 is a schematic diagram of a display interface of a hot spot region generation system in an application example of the page adaptation method of the present invention.

The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The main solution of the invention is: acquiring a first screen resolution of a first terminal, a second screen resolution of a second terminal and an original image resolution of a target webpage when the first terminal displays; determining a first root element font size according to the first screen resolution, and determining a second root element font size according to the second screen resolution; and determining the image resolution of the target webpage when the target webpage is displayed at the second terminal according to the first root element font size, the second root element font size and the original image resolution.

When the webpage with the hot spot area is generated through the area tag attribute, the coordinate point of the hot spot area cannot change along with the adjustment of the display window, and the coords attribute coordinates corresponding to different mobile terminals are different, so that the webpage with the hot spot area cannot be adapted to different mobile terminals. Therefore, the present invention proposes the above solution, and aims to adapt a web page with a hot spot region to different mobile terminals, so as to improve the display effect of the web page with the hot spot region when the web page is displayed on different mobile terminals.

Referring to fig. 1, fig. 1 is a schematic structural diagram of a display terminal of a hardware operating environment according to an embodiment of the present invention.

As shown in fig. 1, the display terminal may include: a communication bus 1002, a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.

Those skilled in the art will appreciate that the display terminal configuration shown in fig. 1 is not intended to be limiting of display terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.

In the display terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a page adaptation program stored in the memory 1005 and perform the relevant steps of the various embodiments of the following page adaptation method.

Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of a page adaptation method of the present invention, in this embodiment, the page adaptation method includes the following steps:

step S10: acquiring a first screen resolution of a first terminal, a second screen resolution of a second terminal and an original image resolution of a target webpage when the first terminal displays;

step S20: determining a first root element font size according to the first screen resolution, and determining a second root element font size according to the second screen resolution;

step S30: and determining the image resolution of the target webpage when the target webpage is displayed at the second terminal according to the first root element font size, the second root element font size and the original image resolution.

It should be noted that the first terminal refers to a terminal device, such as a computer, currently adapted to the target webpage; the second terminal refers to a terminal device, such as a mobile phone, to which the target webpage page needs to be adapted; the target webpage refers to a webpage which needs to be subjected to page adaptation after the hot spot area is currently set; the first screen resolution refers to a display resolution of the first terminal, the second screen resolution refers to a display resolution of the second terminal, and an image resolution of a target webpage page, which is referred to by the original image resolution, when the target webpage page is set and displayed on the first terminal.

In order to improve the effectiveness of page adaptation and avoid occupying system resources by performing page adaptation when the page adaptation is not required, before performing the page adaptation, a terminal type (a first type) to which a first terminal belongs and a terminal type (a second type) to which a second terminal belongs may be acquired, and then the first type and the second type are compared to determine whether the page adaptation is required for a target webpage. If the second type is consistent with the first type, the resolution of the first screen is consistent with that of the second screen, and page adaptation is not needed. At this time, the original image resolution may be used as the image resolution of the target webpage when displayed at the second terminal. If the second type is not consistent with the first type, the first screen resolution is not consistent with the second screen resolution, and the target webpage can be adapted to the second terminal only by carrying out page adaptation so as to achieve a better display effect, so that the problem that the target webpage is displayed too small on the second terminal and is inconvenient to look up or the target webpage is displayed too large on the second terminal so that the image definition is poor or exceeds the display interface of the second terminal is avoided.

When the target webpage page needs to be subjected to page adaptation, in order to improve the effectiveness of page adaptation, the page adaptation can be performed based on the font size of the root element. The method specifically comprises the following steps: and determining the image resolution of the target webpage when the target webpage is displayed at the second terminal according to the first root element font size corresponding to the first terminal, the second root element font size corresponding to the second terminal and the original image resolution of the target webpage when the first terminal is displayed. Wherein the first root element font size is available according to a first screen resolution and the second root element font size is available according to a second screen resolution. The method specifically comprises the following steps: a unit conversion scale is preset to convert the first screen resolution to a first root element font size and the second screen resolution to a second root element font size. Here, the root element font size refers to a size unit of a font size relative to a root element (html), and is dynamically adjustable according to different standards according to different screen resolutions of different terminals.

For example, the unit transition scale may be set to 20rem, and at this time, if the first screen resolution is 640pi × 320pi and the second screen resolution is 1280pi × 320pi, the corresponding first root element size is 640pi/20 pi =32pi/rem and the second root element size is 1280pi/20pi =64pi/rem based on the screen width. Of course, the screen height can be used as a reference, and the selection can be reasonably carried out according to specific situations. For example, when the screen width of the first terminal is not consistent with the screen width of the second terminal, the screen width is taken as a reference; when the screen height of the first terminal is not consistent with the screen height of the second terminal, taking the screen height as a reference; when the screen width of the first terminal is not consistent with the screen width of the second terminal and the screen height of the first terminal is not consistent with the screen height of the second terminal, the screen width may be used as a width reference, and the screen height may be used as a height reference, respectively, which is not specifically limited herein.

After the first root element font size and the second root element font size are determined, the image resolution of the target webpage when the target webpage is displayed at the second terminal can be determined according to the first root element font size, the second root element font size and the original image resolution. Specifically, the original image resolution of the target webpage when displayed at the first terminal may be converted into a target size corresponding to the first root element size according to the first root element size, and then the image resolution of the target webpage when displayed at the second terminal may be determined according to the target size and the second root element size. For example, when the first root element size is 32pi/rem and the original image resolution is 320pi × 160pi, the target size obtained by conversion according to the first root element size is 320pi/(32pi/rem) =10rem, and 160pi/(32pi/rem) =5 rem. That is, the resulting target size is 10rem by 5 rem. At this time, if the size of the second root element is 64pi/rem, the image resolution of the target webpage when displayed at the second terminal is 10rem × 64pi/rem =640pi, and 5rem × 64pi/rem =320pi, that is, the image resolution of the target webpage when displayed at the second terminal is 640pi × 320 pi. That is, the quotient of the font size of the second root element and the font size of the first root element may be used as the scaling ratio of the image resolution of the target webpage when the second terminal displays, and the image resolution of the target webpage when the second terminal displays may be determined by scaling the original image resolution according to the scaling ratio.

In the embodiment, the image resolution of the target webpage when the second terminal displays is determined through the font size of the first root element, the font size of the second root element and the resolution of the original image, so that the target webpage can be adapted to terminal devices with different screen sizes, and a better display effect can be achieved on different terminal devices.

Referring to fig. 3, fig. 3 is a flowchart of a second embodiment of the page adaptation method of the present invention, in this embodiment, before step S10, the method further includes:

step S01: loading and displaying a target image;

step S02: receiving a setting operation of a hot spot region triggered based on the target image;

step S03: and setting at least one hot spot area for the target image according to the setting operation so as to obtain the target webpage.

Before performing page adaptation on the target webpage, parameter setting can be performed on a target webpage setting interface of the first terminal to generate the target webpage with at least one hot spot area, and then page adaptation is performed on the target webpage to enable the target webpage to be adapted to the second terminal. It should be noted that the hot spot region refers to an image region that can jump to a preset jump link after being triggered.

Optionally, a picture address can be input on a setting interface of the target webpage page to load the target image; or, importing the target image by the image importing function on the target webpage page setting interface; alternatively, the target image or the like is imported by image scanning. In order to improve the security of the target webpage configuration, in this embodiment, it is preferable that the target image is loaded and displayed in a manner of inputting a picture address on the target webpage setting interface. It should be noted that the target image refers to an image to which a hot spot region needs to be added to obtain a target webpage page.

After the target image is loaded and displayed, the setting operation of the hot spot area of the target image can be triggered on the target webpage page setting interface according to the self requirement, so that at least one hot spot area can be set for the target image according to the triggered setting operation, and the design requirement of a user on the hot spot area of the target webpage page can be flexibly met.

Optionally, when a hot spot region is set for the target image according to the setting operation, a display parameter of the hot spot region in the target image and a jump link of the hot spot region may be set, so as to generate the hot spot region according to the set display parameter in the target image according to the jump link, so as to form the target webpage. Optionally, the settable display parameters include: the shape of the hot spot region, such as a square or circle; the rotation angle of the hot spot region, such as 30 degrees left-handed rotation and 60 degrees right-handed rotation; the fixed position of the hot spot area, such as the position where a preset hot spot area model is located; the size of the hot spot region, such as the length, width, height, radius, etc., is not particularly limited herein.

Different display parameters can be set through different setting modes. In this embodiment, on the one hand, the shape and the rotation angle of the hot spot region may be set by the first setting operation. Alternatively, the first setting operation may be at least one of a click operation, an input operation, and/or a slide operation, and is not particularly limited herein. For example, a desired set shape may be selected from preset shape buttons by a click operation, and a desired set rotation angle may be selected from a progress bar of preset rotation angles; or, the identification information such as a shape name or a shape pattern can be directly input through input operation to acquire a shape matched with the identification information from the hot spot region, and a rotation direction and/or a rotation angle can also be input; alternatively, the shape may be switched by a slide operation to select a shape to be set as desired, and the rotation direction and the rotation angle may be selected by a slide operation.

On the other hand, the position and size of the hot spot region can be set by the second setting operation. Optionally, the second setting operation may be at least one of a click operation, a drag operation, a zoom operation, and/or an input operation, which is not limited in detail herein. For example, the hot spot region may be set at the clicked position by a clicking operation (such that the center of the hot spot region coincides with the clicked position), and the size of the hot spot region may be set by a plurality of clicking operations, for example, when the hot spot region is circular, the center of the circle may be set by a first clicking operation, and the radius (the distance between the clicked position of a second clicking operation and the clicked position of the first clicking operation) may be set by a second clicking operation. Or, the preset hot spot region model can be dragged to a target position through a dragging operation, so that the target position is set as the position of the hot spot region; then, the size of the hot spot region and the like are set by the scaling operation.

In yet another aspect, the jump link may be set through a third setting operation. Alternatively, the third setting operation may be an input operation, an import operation, a scan operation, or the like, and is not particularly limited herein. For example, the input can be directly input in an input box of a jump link on a target webpage setting interface; or, importing the data through a website importing function; or by scanning a two-dimensional code, etc.

Alternatively, the first setting operation, the second setting operation, and the third setting operation may be the same or different. In order to improve convenience of inputting the display parameters and the jump link, the first setting operation, the second setting operation, and the third setting operation in this embodiment are preferably different setting operations. Alternatively, the first setting operation may be a click operation, the second setting operation may be a drag operation, and the third setting operation may be an input operation. Of course, the same display parameter may also support a plurality of different setting modes, and the user may flexibly select the setting mode according to the user's own use habit, which is not specifically limited herein.

After the display parameters and the jump link of the hot spot area in the target image are set according to the setting operation, the hot spot area can be generated in the target image by means of a preset hot spot area model. Specifically, the hot spot region mode may be converted from the initial form to a form corresponding to the set shape, rotation angle, and size, the hot spot region model after the form conversion is dragged on the target image to drag the hot spot region mode to a position where a hot spot region is desired to be generated, then an add link operation is triggered to add a jump link to the hot spot region model, then a copy of the hot spot region model is generated and fixed at the current position of the hot spot region model, and the current hot spot region model is still in an editable state, and adjustment of the display parameter and the jump link may be performed, so as to be used for generating a next hot spot region.

It should be noted that before the link adding operation is triggered, the display parameters and the jump link of the current hot spot area can be set arbitrarily; after the link adding operation is triggered, the display parameters and the jump link of the current hot spot area cannot be changed, and only the display parameters and the jump link of the next hot spot area can be changed.

Optionally, after the hot spot area is generated, the hot spot area can be quickly deleted by clicking the hot spot area; further, in order to realize batch deletion of the hot spot areas, after a plurality of hot spot areas are simultaneously selected through the selection box, the deletion operation of the hot spot areas is triggered.

According to the embodiment, the hot spot area is added in the target image to acquire the target webpage, so that when the target webpage is adapted to different terminal devices, the hot spot area in the target webpage can also be adapted to different terminal devices, the situation that the hot spot area is too large and is easy to operate by mistake or the hot spot area is too small and is not convenient to trigger is avoided, and the convenience of hot spot area operation can be improved.

Referring to fig. 4, fig. 4 is a flowchart of a third embodiment of the page adaptation method of the present invention, in this embodiment, after step S03, the page adaptation method further includes:

step S04: when code copying operation is received, generating a page layout code of the target webpage, and acquiring the type of an application platform required by the target webpage;

step S05: converting the page layout code into a target page layout code adapted to the type of application platform to apply the target page layout code to the type of application platform.

After at least one hot spot area is generated in a target image according to the display parameters and the jump link, if code copying operation is received, a page layout code of a target webpage adaptive to a current application platform can be automatically generated. For example, when the H5 browser configures a hot spot area of a web page, the correspondingly generated page layout code is a page layout code adapted to the H5 browser. However, different platform types have different page layouts and correspondingly adapted page layout codes. Therefore, after the page layout of the target webpage is generated, the page layout code of the target webpage needs to be converted into the target page layout code adapted to the selected application platform type (such as the WeChat applet) according to the type of the pre-selected application platform, so that when the target page layout code is applied to the selected application platform type, the problems of messy codes, disordered layout and the like do not occur.

Specifically, to convert the page layout code of the target web page into the target page layout code, on one hand, mapping between partitions and nodes is implemented, and on the other hand, mapping of a hyperlink function is implemented. Taking an H5 browser and a wechat applet as examples, a Div tag in a page layout code corresponding to the H5 browser may be mapped to a view tag in a page layout code corresponding to the wechat applet; and the href function of the a link in the page layout code corresponding to the H5 browser can be mapped through the function of the custom component of the WeChat applet. The method specifically comprises the following steps: after the page layout code is analyzed into the abstract syntax tree, the abstract syntax tree is traversed and replaced according to the node mapping relation and the function mapping relation between the current application platform and the application platform to be applied to generate a new abstract syntax tree, and then the new abstract syntax tree is compiled to generate a target page layout code.

Optionally, after generating at least one hot spot region in the target image according to the display parameters and the jump link, when the code copying operation is received, if the target webpage is applied to the second terminal, the steps of obtaining the first screen resolution of the first terminal, the second screen resolution of the second terminal and the original image resolution of the target webpage when the target webpage is displayed at the first terminal can be executed first to determine the image resolution of the target webpage when the target webpage is displayed at the second terminal, then generating a page layout code in combination with the page layout of the target web page and the determined image resolution, and converts the page layout code into a target page layout code, so that the page layout code can be suitable for different application platforms, and when different terminal equipment runs the page code, the page code can be displayed according to the display sizes of the different terminal equipment.

In the embodiment, the page layout code is converted into the target page layout code adapted to the selected application platform, so that the target page layout code can be applied to the selected application platform, and the problem that the display effect of the target webpage when the selected application platform is displayed is influenced due to the problems of code disorder, layout disorder and the like caused by the improper code matching is avoided.

Referring to fig. 5, fig. 5 is a flowchart illustrating a specific application example of the page adaptation method of the present invention. The page adaptation method in the application example comprises the following steps:

step S1: constructing a picture hot spot region generation system based on HTML + JS + CSS front-end technology;

step S2: configuring parameter values such as picture addresses, jump links, cross-platform types, image hot spot area shape types and the like;

step S3: dynamically adding, modifying and deleting the hyperlink, and dragging and adjusting the position of the picture at the hot spot;

step S4: calculating and adapting different mobile terminals according to the generated hot spot region model and generating different codes supported by cross-platform;

for example, in the current stage h5, most mobile terminals are arranged in css rem units, and the rem units are font-size attribute values relative to html labels, so that it is only necessary to calculate font-size values of different mobile terminals by js, and it can be ensured that the positions of the hot spot areas relative to the image are all at the same position under the condition that the rem of different mobile terminals is not changed.

Step S5: the generated hot spot area code is quickly copied by one key, so that the quick operation of operators is facilitated;

therefore, all different platform scenes can be integrated, and the effect of cross-platform adaptation is achieved; moreover, the hyperlink of the banner picture area can be rapidly configured, so that the operation efficiency of operators is improved; moreover, the research and development cost of enterprise investment can be reduced, and the development time is saved. An interface diagram of the image hot spot region generation system is built based on the HTML + JS + CSS front-end technology, as shown in FIG. 6.

In addition, an embodiment of the present invention further provides a display terminal, where the display terminal includes a memory, a processor, and a page adaptation program stored on the processor and capable of running on the processor, and the processor implements the steps of the page adaptation method when executing the page adaptation program.

In addition, an embodiment of the present invention further provides a readable storage medium, where a page adaptation program is stored on the readable storage medium, and the page adaptation program, when executed by a processor, implements the steps of the page adaptation method described above.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a television, or a network device) to execute the method according to the embodiments of the present invention.

The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种数据上报方法、装置及可读介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!