CN110781440A - Container height adjusting method and device, computer equipment and storage medium - Google Patents

Container height adjusting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110781440A
CN110781440A CN201911053673.2A CN201911053673A CN110781440A CN 110781440 A CN110781440 A CN 110781440A CN 201911053673 A CN201911053673 A CN 201911053673A CN 110781440 A CN110781440 A CN 110781440A
Authority
CN
China
Prior art keywords
container
height
area
target
height value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911053673.2A
Other languages
Chinese (zh)
Inventor
曹曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Neusoft Wang Hai Technology Co Ltd
Original Assignee
Beijing Neusoft Wang Hai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Neusoft Wang Hai Technology Co Ltd filed Critical Beijing Neusoft Wang Hai Technology Co Ltd
Priority to CN201911053673.2A priority Critical patent/CN110781440A/en
Publication of CN110781440A publication Critical patent/CN110781440A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a method and a device for adjusting the height of a container, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring size information of target content to be placed and a height value of a target container, wherein the target container comprises a first area and a second area; determining a height value of the first area according to the size information, wherein the first area is used for placing the target content; and determining the height value of the second area according to the height value of the target container and the height value of the first area. The height of the first area is automatically and dynamically calculated by dynamically adapting the height change, then the height of the second area is calculated based on the height and the total height of the container, and the height of the two areas is not required to be hard coded, so that the dynamic layout of the page is conveniently and quickly established, the working efficiency is improved, and the manual calculation error is reduced.

Description

Container height adjusting method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a method and an apparatus for adjusting a height of a container, a computer device, and a storage medium.
Background
When developing front-end pages, page layout design is often considered, and many times scenes with fixed height in the upper region and self-adaptive distraction and scrolling in the lower region need to be handled.
The conventional solution is basically to manually set the height of the upper zone to a fixed value and then to take the total height of the container minus this fixed height to obtain the height of the lower zone.
This approach has two major disadvantages:
1) the fixed value of the upper area is manually set, and the height of the upper part of the display panel is not easy to control, so that errors are easy to generate, and the attractiveness of the layout is affected.
2) Conventional solutions are not flexible to adapt to layout variations. Since the height of the upper area is manually set to a fixed value in advance, and when the content in the upper area is changed, the height generally fluctuates, so that the height of the upper area needs to be manually reset whenever the content in the upper area is changed, and the height of the lower area is manually calculated according to the new height of the upper area, so that the code is not flexible enough, the change is large, and the efficiency is low.
Disclosure of Invention
The embodiment of the invention can provide a container height adjusting method, a container height adjusting device, computer equipment and a storage medium, wherein the container height adjusting method and the container height adjusting device can dynamically adapt to height change and improve working efficiency.
In order to solve the above technical problem, the embodiment of the present invention adopts a technical solution that: provided is a container height adjusting method, comprising the following steps:
acquiring size information of target content to be placed and a height value of a target container, wherein the target container comprises a first area and a second area;
determining a height value of the first area according to the size information, wherein the first area is used for placing the target content;
and determining the height value of the second area according to the height value of the target container and the height value of the first area.
Optionally, before the step of obtaining the size information of the target content to be placed and the height value of the target container, the method includes the following steps:
creating a container as a target container, and setting a total height value of the target container;
the target container is divided into a first area and a second area.
Optionally, the creating a container as a target container, and the setting a total height value of the target container includes:
acquiring a container creating instruction of a user;
determining container attributes from the container creation instructions to generate a container.
Optionally, the step of determining the height value of the first area according to the size information includes the following steps:
acquiring size information of the target container;
calculating a display scale of the target content according to the size information of the target container and the size information of the target content, wherein the display scale is a ratio of a size numerical value of the target content to a size numerical value of the target container;
and determining the height value of the first area according to the display scale.
Optionally, the step of determining the height value of the first region according to the display scale includes the following steps:
judging whether the display proportion is larger than a preset first threshold value or not;
when the display proportion is larger than the preset first threshold value, calculating the height value of the first area according to the display proportion;
and when the display scale is smaller than the preset first threshold value, taking the height value of the target content as the height value of the first area.
Optionally, when the display scale is greater than the preset first threshold, the step of calculating the height value of the first area according to the display scale includes the following steps:
zooming out the target content according to the display scale;
calculating the height value of the target content after zooming;
defining the scaled height value as a height value of the first region.
Optionally, the step of obtaining the size information of the target content to be placed and the height value of the target container is preceded by the steps of:
acquiring attribute information of an element to be placed;
judging whether the attribute information meets a preset placing condition or not;
and when the attribute information meets the placement condition, defining the element to be placed as the target content.
In order to solve the above technical problem, an embodiment of the present invention further provides a device for adjusting a height of a container, including:
the device comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring the size information of target content to be placed and the height value of a target container, and the target container comprises a first area and a second area;
a processing module, configured to determine a height value of the first area according to the size information, where the first area is used for placing the target content;
and the execution module is used for determining the height value of the second area according to the height value of the target container and the height value of the first area.
Optionally, the device for adjusting the height of the container further includes:
the first creating sub-module is used for creating a container as a target container and setting the total height value of the target container;
and the first processing submodule is used for dividing the target container into a first area and a second area.
Optionally, the device for adjusting the height of the container further includes:
the first acquisition submodule is used for acquiring a container creation instruction of a user;
and the first generation submodule is used for determining the container attribute according to the container creation instruction so as to generate the container.
Optionally, the device for adjusting the height of the container further includes:
the second acquisition submodule is used for acquiring the size information of the target container;
the first calculation submodule is used for calculating the display proportion of the target content according to the size information of the target container and the size information of the target content, wherein the display proportion is the ratio of the size numerical value of the target content to the size numerical value of the target container;
and the second calculation submodule is used for determining the height value of the first area according to the display scale.
Optionally, the device for adjusting the height of the container further includes:
the first judgment submodule is used for judging whether the display proportion is larger than a preset first threshold value or not;
the first execution submodule is used for calculating the height value of the first area according to the display scale when the display scale is larger than the preset first threshold;
and the second execution sub-module is used for taking the height value of the target content as the height value of the first area when the display scale is smaller than the preset first threshold value.
Optionally, the device for adjusting the height of the container further includes:
the first zooming submodule is used for zooming out the target content according to the display scale;
the third calculation submodule is used for calculating the height value of the zoomed target content;
and the second processing submodule is used for defining the scaled height value as the height value of the first area.
Optionally, the device for adjusting the height of the container further includes:
the third obtaining submodule is used for obtaining attribute information of the element to be placed;
the second judgment submodule is used for judging whether the attribute information meets the preset placing condition or not;
and the third execution submodule is used for defining the element to be placed as the target content when the attribute information meets the placing condition.
In order to solve the above technical problem, an embodiment of the present invention further provides a computer device, including a memory and a processor, where the memory stores computer-readable instructions, and the computer-readable instructions, when executed by the processor, cause the processor to execute the steps of the container height adjusting method described above.
In order to solve the above technical problem, an embodiment of the present invention further provides a storage medium storing computer readable instructions, which when executed by one or more processors, cause the one or more processors to perform the steps of the container height adjustment method.
The embodiment of the invention has the beneficial effects that:
the height of the second area is obtained by determining the height of the first area and then calculating, the height of the two areas does not need to be hard coded, the self-adaptive container can be used anywhere as long as the self-adaptive container is packaged at one time, the use is convenient, and the realization is simple. The height of the first area is automatically and dynamically calculated by dynamically adapting the height change, and then the height of the second area is automatically calculated based on the height and the total height of the container, so that the dynamic layout of the page is conveniently and quickly established, the working efficiency is improved, and the manual calculation error is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic view of a basic flow chart of a method for adjusting the height of a container according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating the creation of a container partition according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of creating a container according to a user instruction according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a process of calculating a display scale according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a process of determining a height value of a first region according to a display scale according to an embodiment of the invention;
FIG. 6 is a flowchart illustrating a process of reducing the target content and determining the height value of the first area according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating a process of determining target content according to an embodiment of the invention;
FIG. 8 is a block diagram showing the basic structure of a device for adjusting the height of a container according to an embodiment of the present invention;
FIG. 9 is a block diagram of the basic structure of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
In some of the flows described in the present specification and claims and in the above figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, with the order of the operations being indicated as 101, 102, etc. merely to distinguish between the various operations, and the order of the operations by themselves does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without any inventive step, are within the scope of the present invention.
As will be appreciated by those skilled in the art, "terminal" as used herein includes both devices that are wireless signal receivers, devices that have only wireless signal receivers without transmit capability, and devices that include receive and transmit hardware, devices that have receive and transmit hardware capable of performing two-way communication over a two-way communication link. Such a device may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (personal communications service), which may combine voice, data processing, facsimile and/or data communications capabilities; a PDA (personal digital assistant), which may include a radio frequency receiver, a pager, internet/intranet access, web browser, notepad, calendar and/or GPS (global positioning system) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal" or "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or situated and/or configured to operate locally and/or in a distributed fashion at any other location(s) on earth and/or in space. As used herein, a "terminal device" may also be a communication terminal, a web terminal, a music/video playing terminal, such as a PDA, an MID (mobile internet device), and/or a mobile phone with music/video playing function, and may also be a smart tv, a set-top box, and the like.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram illustrating a basic flow of a method for adjusting a height of a container according to the present embodiment.
As shown in fig. 1, a method for adjusting the height of a container includes the following steps:
s1100, obtaining size information of target content to be placed and a height value of a target container, wherein the target container comprises a first area and a second area;
when the target container is created, the target container is divided into two parts, namely a first area and a second area, the height values of the two parts are respectively defined as a first variable and a second variable, and the height of the two parts of the container is determined by assigning the calculated data into the two variables. Specifically, when the target content or the element to be placed in the first area of the container is obtained, size data of the target content is obtained, where the size data includes width and height data of the target content, for example, when the target content is a picture, the size is 100px by 50px, and the attribute information of the target container is called, from which the height value of the target container is obtained.
The container of this example is a Div container.
S1200, determining a height value of the first area according to the size information, wherein the first area is used for placing the target content;
after the size of the target content is obtained, a corresponding height value is obtained through calculation according to the height data of the target content and is used as a height value of the first area. Specifically, the height of the target content may be directly taken as the height of the first area of the container, i.e. the height value of the first area of the container is equal to the height value of the target content; in some embodiments, when the size of the target content is larger than the range of the container, the target content needs to be scaled down to fit the target content into the container, so that the scaling ratio is first calculated according to the size of the container and the size of the target content, and then the target content is scaled, and the height value of the first area of the container is equal to the scaled height value of the target content.
S1300, determining a height value of the second area according to the height value of the target container and the height value of the first area;
the method comprises the steps of placing content with fixed height in a first area of a container, such as a picture or a file frame, placing content with non-fixed height in a second area of the container, such as a table, determining the height of the first area of the container according to target content, and then dynamically adjusting the height of the second area of the container. Specifically, the height value of the obtained first region is defined as H1, the total height of the container set when the container is created is defined as H, the height value of the second region of the container is defined as H2, and after the height value of the first region is obtained, the height value H1 of the first region is subtracted from the total height H of the container, so that the obtained result is the height value H2 of the second region of the container, that is, H2 is defined as H-H1.
After the height value of the first area and the height value of the second area are obtained through calculation, the height value of the first area and the height value of the second area are respectively assigned to the first variable and the second variable through JavaScript, and therefore the heights of the two parts of the container are determined.
As shown in fig. 2, step S1100 further includes the following steps:
s1010, creating a container as a target container, and setting the total height value of the target container; creating a Div container in a page as a target container, and setting attributes of the target container, wherein the attributes comprise a width value, a total height value, a positioning attribute, a hierarchy attribute and the like.
S1020, dividing the target container into a first area and a second area;
the target container is divided into two parts, namely a first area and a second area, by a slot mode, and corresponding heights are defined as a first variable and a second variable respectively.
The heights of the two parts are not hard coded, but are assigned after waiting for a determined value in a variable mode, so that the container can adaptively adjust the heights of the two parts according to the placed content.
As shown in fig. 3, step S1020 specifically includes the following steps:
s1021, acquiring a container creation instruction of a user;
during the process of page creation or modification, the user can select a convenient container creation mode, for example, the attribute of the container is determined by a frame selection mode. Specifically, when the user triggers the container creation instruction, the user is prompted to create the container in the page, and the range information selected by the user in the page is captured, wherein the range information includes, but is not limited to, the size and the position of the selection range. The range may be selected by a frame selection, a frame with existing content, or a range determined by multiple points, and the range may be determined by determining a range with a certain area, and is not limited herein.
S1022, determining container attributes according to the container creating instruction to generate a container;
for convenience of description, in this embodiment, it is assumed that a framing mode is an operation mode for creating a container, and after a user triggers a container creation instruction and frames a range, basic attributes of the framing range are acquired, where the basic attributes include a size, a border length, a position, and the like of the frame.
The container is created in a user operation instruction mode, the code writing process of container creation is reduced, the container with the required position and the required size is generated more intuitively, and the convenience of user operation is improved.
As shown in fig. 4, step S1200 specifically includes the following steps:
s1210, acquiring size information of the target container;
after the size of the target content is acquired, the attribute information of the target container is called, and the size information of the target container is acquired. The dimensional information for the target container is set for the container as it is created, including the width and total height of the container, e.g., 200px by 100 px.
S1220, calculating a display scale of the target content according to the size information of the target container and the size information of the target content, wherein the display scale is a ratio of a size numerical value of the target content to a size numerical value of the target container;
after the container size is obtained, the ratio of the container width and the height to the target content width, i.e. the ratio of the width to the height, is obtained, and the display scale of the target content is determined. Specifically, the ratio of the target-content width to the container width is a width ratio, i.e., width ratio is the target-content width/container width, and the ratio of the target-content height to the container height is a height ratio, i.e., height ratio is the target-content height/container height. After the width ratio and the height ratio are obtained, the sizes of the width ratio and the height ratio are judged, and the larger one of the width ratio and the height ratio is used as a display scale. In some embodiments, after the width ratio and the height ratio are obtained, the sizes of the two are judged, and the smaller one is used as the display scale.
S1230, determining the height value of the first area according to the display scale;
after the display scale is determined, whether the target content needs to be zoomed is determined according to the display scale, and then the height value of the first area is determined. Specifically, a threshold is set in the system for judging whether the content needs to be scaled, and when the size of the content is consistent with that of the container, the content can be just completely placed in the container, namely the display scale is 1; when the display scale is larger than 1, the size of the content is larger than that of the container, and the content needs to be reduced to be completely placed in the container; when the display scale is less than 1, it is indicated that the size of the container is larger than the content, and the content cannot fill the container, so that it may be considered to enlarge the content or to directly place the content in the container. Based on this, the set threshold is 1, when the display scale is larger than 1, the content is reduced, when the display scale is smaller than 1, the content is enlarged, after the content is zoomed, the height of the zoomed content is calculated by the display scale, and the height after zooming is the product of the original height of the content and the display scale and is used as the height value of the first area of the container.
In some embodiments, the value of the threshold may be adjusted according to actual requirements, for example, when the content is required to be not full of the container and a certain gap is left, the value of the threshold may be decreased, and when the content is allowed to be properly out of the range of the container, the value of the threshold may be increased, which is not limited herein.
By setting the display scale, when the content is not matched with the size of the container, the content can be zoomed, so that the content can be well matched with the container, and the applicability of the container is improved.
As shown in fig. 5, step S1230 specifically includes the following steps:
s1231, judging whether the display proportion is larger than a preset first threshold value or not;
the system sets a threshold for determining whether the content needs to be scaled, and when the size of the content is consistent with the size of the container, it indicates that the content can be just completely placed in the container, that is, the display scale is 1. And after the display proportion is obtained through calculation, comparing the display proportion with a first threshold value, and judging whether the display proportion is larger than the first threshold value.
S1232, when the display proportion is larger than the preset first threshold value, calculating the height value of the first area according to the display proportion;
when the display scale is larger than the first threshold, the content is directly put into the container, the proportion of the content in the container is larger than the ideal proportion, and the content needs to be reduced to reach the ideal proportion state. For example, when the first threshold is 1, and the display scale is greater than 1, it indicates that the content cannot be completely put into the container, and the content needs to be reduced to be completely displayed in the container. At this time, the content is reduced in accordance with the display scale so that the content can be completely placed in the container, and the height value of the reduced content is set as the height value of the first region of the target container.
S1233, when the display scale is smaller than the preset first threshold, taking the height value of the target content as the value of the height value of the first area;
when the display scale is smaller than the first threshold, it is described that the content is placed in the container directly in size, and the proportion of the content in the container is smaller than that in the setting. For example, when the first threshold is 1, and the display scale is smaller than 1, the content can be completely displayed in the container without reducing the content, and the height value of the content is directly used as the height value of the first area.
Whether the content can be completely displayed in the container is judged by comparing the display proportion with the threshold value, and when the content cannot be completely displayed in the container, the content is reduced, so that the content is adapted to the container, and the applicability of the container is improved.
As shown in fig. 6, step S1232 specifically includes the following steps:
s1234, zooming out the target content according to the display scale;
when the display scale is larger than the preset threshold, the content cannot be completely displayed when being placed in the container, and therefore the content needs to be reduced. The content is reduced in an equal scale according to the display scale, for example, when the display scale is 1.25, the content is reduced in an equal scale by 1.25 times as the content to be placed in the container.
S1235, calculating the height value of the zoomed target content;
after the content is reduced, a height value of the content after the content is scaled is calculated according to a display scale, the height after the content is scaled is a quotient of an original height and the display scale, for example, the original height of the content is 100px, the display scale is 1.25, and the height after the content is scaled is 100/1.25 or 80 px.
S1236, defining the zoomed height value as the height value of the first area;
and after the scaled height value is obtained through calculation, taking the scaled height value as the height value of the first area of the target container.
The height of the zoomed height is obtained by zooming the content according to the display scale and is used as the height of the first area of the container, when the size of the content is larger than that of the container, the content can be completely displayed in the container, meanwhile, the height of the first area of the container can be adjusted along with the zoomed size of the content, the content and the container are adaptive to each other, and dynamic layout is achieved.
As shown in fig. 7, step S1100 further includes the following steps:
s1030, acquiring attribute information of the element to be placed;
when the element to be placed is obtained, the attribute information of the element to be placed is called, wherein the attribute information comprises the file format, the classification or the file suffix and the like of the element to be placed and is used for distinguishing the type of the element to be placed.
S1040, judging whether the attribute information meets a preset placing condition;
the system is preset with a placement condition for determining whether the element to be placed is suitable for being placed in the first area of the container, where the placement condition may be that the type of the element to be placed meets a specified type, and the height of the specified type is generally a fixed value, for example, the element to be placed is a picture, a text box, or an audio plug-in. And judging whether the element to be placed meets the placing condition or not according to the acquired attribute information, for example, judging the file format of the element to be placed when the placing condition is that the element to be placed belongs to the picture, and determining that the element to be placed meets the placing condition when the file format of the element to be placed belongs to the picture format.
S1050, when the attribute information meets the placing condition, defining the element to be placed as the target content;
when the attribute information meets the placement condition, that is, the element to be placed belongs to the content with fixed height, and is suitable for being placed in the first area of the container, the element to be placed is used as the target content for setting the height of the first area of the container.
The attribute of the element to be placed is judged, and the element to be placed is determined to belong to the content with fixed height, so that the element to be placed is defined as target content, and the height of the first area of the container can be conveniently adjusted according to the content to be placed.
In order to solve the above technical problem, an embodiment of the present invention further provides a device for adjusting a height of a container. Referring to fig. 8, fig. 8 is a block diagram of a basic structure of the device for adjusting the height of a container according to the present embodiment.
As shown in fig. 8, the container height adjusting apparatus includes: an acquisition module 2100, a processing module 2200, and an execution module 2300. The acquisition module is used for acquiring size information of target content to be placed and a height value of a target container, wherein the target container comprises a first area and a second area; the processing module is used for determining a height value of the first area according to the size information, wherein the first area is used for placing the target content; the execution module is used for determining the height value of the second area according to the height value of the target container and the height value of the first area.
The height of the second area is obtained by determining the height of the first area and then calculating, the height of the two areas does not need to be hard coded, the self-adaptive container can be used anywhere as long as the self-adaptive container is packaged at one time, the use is convenient, and the realization is simple. The height of the first area is automatically and dynamically calculated by dynamically adapting the height change, and then the height of the second area is automatically calculated based on the height and the total height of the container, so that the dynamic layout of the page is conveniently and quickly established, the working efficiency is improved, and the manual calculation error is reduced.
In some embodiments, the container height adjusting device further comprises: the system comprises a first creating sub-module and a first processing sub-module. The first creating submodule is used for creating a container as a target container and setting the total height value of the target container; the first processing submodule is used for dividing the target container into a first area and a second area.
In some embodiments, the container height adjusting device further comprises: the device comprises a first acquisition submodule and a first generation submodule. The first obtaining submodule is used for obtaining a container creating instruction of a user; the first generation submodule is used for determining the container attribute according to the container creation instruction so as to generate the container.
In some embodiments, the container height adjusting device further comprises: the device comprises a second obtaining submodule, a first calculating submodule and a second calculating submodule. The second acquisition submodule is used for acquiring the size information of the target container; the first calculation submodule is used for calculating the display proportion of the target content according to the size information of the target container and the size information of the target content, wherein the display proportion is the ratio of the size numerical value of the target content to the size numerical value of the target container; and the second calculation submodule is used for determining the height value of the first area according to the display scale.
In some embodiments, the container height adjusting device further comprises: the device comprises a first judgment submodule, a first execution submodule and a second execution submodule. The first judgment submodule is used for judging whether the display proportion is larger than a preset first threshold value or not; the first execution submodule is used for calculating the height value of the first area according to the display scale when the display scale is larger than the preset first threshold; and the second execution sub-module is used for taking the height value of the target content as the height value of the first area when the display scale is smaller than the preset first threshold.
In some embodiments, the container height adjusting device further comprises: the device comprises a first scaling submodule, a third calculation submodule and a second processing submodule. The first zooming submodule is used for zooming out the target content according to the display scale; the third calculation submodule is used for calculating the height value of the zoomed target content; the second processing submodule is used for defining the scaled height value as the height value of the first area.
In some embodiments, the container height adjusting device further comprises: a third obtaining submodule, a second judging submodule and a third executing submodule. The third obtaining submodule is used for obtaining attribute information of the element to be placed; the second judgment submodule is used for judging whether the attribute information meets a preset placing condition; and the third execution submodule is used for defining the element to be placed as the target content when the attribute information meets the placing condition.
In order to solve the above technical problem, an embodiment of the present invention further provides a computer device. Referring to fig. 9, fig. 9 is a block diagram of a basic structure of a computer device according to the present embodiment.
As shown in fig. 9, the internal structure of the computer device is schematically illustrated. As shown in fig. 9, the computer apparatus includes a processor, a nonvolatile storage medium, a memory, and a network interface connected through a system bus. The non-volatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions can enable the processor to realize a container height adjusting method when being executed by the processor. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, may cause the processor to perform a method of adjusting a height of a container. The network interface of the computer device is used for connecting and communicating with the terminal. It will be appreciated by those skilled in the art that the configurations shown in the figures are block diagrams of only some of the configurations relevant to the present application, and do not constitute a limitation on the computing devices to which the present application may be applied, and that a particular computing device may include more or less components than those shown in the figures, or may combine certain components, or have a different arrangement of components.
In this embodiment, the processor is configured to execute specific functions of the obtaining module 2100, the processing module 2200, and the executing module 2300 in fig. 8, and the memory stores program codes and various data required for executing the modules. The network interface is used for data transmission to and from a user terminal or a server. The memory in the present embodiment stores program codes and data necessary for executing all the submodules in the container height adjusting device, and the server can call the program codes and data of the server to execute the functions of all the submodules.
The present invention also provides a storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the method for adjusting the height of a container according to any of the embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-only memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of adjusting the height of a container, comprising the steps of:
acquiring size information of target content to be placed and a height value of a target container, wherein the target container comprises a first area and a second area;
determining a height value of the first area according to the size information, wherein the first area is used for placing the target content;
and determining the height value of the second area according to the height value of the target container and the height value of the first area.
2. The method for adjusting the height of a container according to claim 1, wherein the step of obtaining the size information of the target content to be placed and the height value of the target container is preceded by the steps of:
creating a container as a target container, and setting a total height value of the target container;
the target container is divided into a first area and a second area.
3. The method for adjusting the height of a container according to claim 2, wherein the step of creating a container as a target container and setting the total height value of the target container comprises the steps of:
acquiring a container creating instruction of a user;
determining container attributes from the container creation instructions to generate a container.
4. The method for adjusting the height of a container according to claim 1, wherein the step of determining the height value of the first area based on the size information comprises the steps of:
acquiring size information of the target container;
calculating a display scale of the target content according to the size information of the target container and the size information of the target content, wherein the display scale is a ratio of a size numerical value of the target content to a size numerical value of the target container;
and determining the height value of the first area according to the display scale.
5. The method for adjusting the height of a container according to claim 4, wherein the step of determining the height value of the first area according to the display scale comprises the steps of:
judging whether the display proportion is larger than a preset first threshold value or not;
when the display proportion is larger than the preset first threshold value, calculating the height value of the first area according to the display proportion;
and when the display scale is smaller than the preset first threshold value, taking the height value of the target content as the height value of the first area.
6. The method for adjusting the height of a container according to claim 5, wherein the step of calculating the height value of the first area according to the display scale when the display scale is greater than the preset first threshold value comprises the steps of:
zooming out the target content according to the display scale;
calculating the height value of the target content after zooming;
defining the scaled height value as a height value of the first region.
7. The method for adjusting the height of a container according to any one of claims 1 to 6, wherein the step of obtaining the size information of the target content to be placed and the height value of the target container is preceded by the steps of:
acquiring attribute information of an element to be placed;
judging whether the attribute information meets a preset placing condition or not;
and when the attribute information meets the placement condition, defining the element to be placed as the target content.
8. An apparatus for adjusting the height of a container, comprising:
the device comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring the size information of target content to be placed and the height value of a target container, and the target container comprises a first area and a second area;
a processing module, configured to determine a height value of the first area according to the size information, where the first area is used for placing the target content;
and the execution module is used for determining the height value of the second area according to the height value of the target container and the height value of the first area.
9. A computer device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of adjusting the height of a container as claimed in any one of the preceding claims 1 to 7.
10. A non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of adjusting a height of a container, the method comprising the method of adjusting a height of a container according to any one of claims 1 to 7.
CN201911053673.2A 2019-10-31 2019-10-31 Container height adjusting method and device, computer equipment and storage medium Pending CN110781440A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911053673.2A CN110781440A (en) 2019-10-31 2019-10-31 Container height adjusting method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911053673.2A CN110781440A (en) 2019-10-31 2019-10-31 Container height adjusting method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110781440A true CN110781440A (en) 2020-02-11

Family

ID=69388088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911053673.2A Pending CN110781440A (en) 2019-10-31 2019-10-31 Container height adjusting method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110781440A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113449222A (en) * 2021-06-17 2021-09-28 青岛海尔科技有限公司 Picture display method, picture display device and electronic equipment
CN114296852A (en) * 2021-12-28 2022-04-08 挂号网(杭州)科技有限公司 Method and device for displaying target page, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294819A (en) * 2013-06-14 2013-09-11 张昀 Method for displaying webpage content in paging mode with HTML5 technology
CN103605783A (en) * 2013-11-29 2014-02-26 优视科技有限公司 Webpage display method and device
CN105988793A (en) * 2015-02-11 2016-10-05 阿里巴巴集团控股有限公司 Image display method and apparatus used for screen display device
US9612734B1 (en) * 2013-09-30 2017-04-04 EMC IP Holding Company LLC Random access browser scrolling for large pages
CN106708985A (en) * 2016-12-12 2017-05-24 北京奇虎科技有限公司 Layout method and device for multi-column webpage
CN108763511A (en) * 2018-05-30 2018-11-06 腾讯科技(深圳)有限公司 Figure layer composition method, device, electronic equipment and storage medium in the page
CN109068166A (en) * 2018-08-17 2018-12-21 北京达佳互联信息技术有限公司 A kind of image synthesizing method, device, equipment and storage medium
CN109308155A (en) * 2018-08-21 2019-02-05 中国平安人寿保险股份有限公司 Adjust method, apparatus, computer equipment and the storage medium of the page
CN109375971A (en) * 2018-09-14 2019-02-22 浙江口碑网络技术有限公司 Layout method and device, storage medium, the electronic device of the page
CN109840083A (en) * 2018-12-27 2019-06-04 杭州亚信云信息科技有限公司 Web pages component template construction method, device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294819A (en) * 2013-06-14 2013-09-11 张昀 Method for displaying webpage content in paging mode with HTML5 technology
US9612734B1 (en) * 2013-09-30 2017-04-04 EMC IP Holding Company LLC Random access browser scrolling for large pages
CN103605783A (en) * 2013-11-29 2014-02-26 优视科技有限公司 Webpage display method and device
CN105988793A (en) * 2015-02-11 2016-10-05 阿里巴巴集团控股有限公司 Image display method and apparatus used for screen display device
CN106708985A (en) * 2016-12-12 2017-05-24 北京奇虎科技有限公司 Layout method and device for multi-column webpage
CN108763511A (en) * 2018-05-30 2018-11-06 腾讯科技(深圳)有限公司 Figure layer composition method, device, electronic equipment and storage medium in the page
CN109068166A (en) * 2018-08-17 2018-12-21 北京达佳互联信息技术有限公司 A kind of image synthesizing method, device, equipment and storage medium
CN109308155A (en) * 2018-08-21 2019-02-05 中国平安人寿保险股份有限公司 Adjust method, apparatus, computer equipment and the storage medium of the page
CN109375971A (en) * 2018-09-14 2019-02-22 浙江口碑网络技术有限公司 Layout method and device, storage medium, the electronic device of the page
CN109840083A (en) * 2018-12-27 2019-06-04 杭州亚信云信息科技有限公司 Web pages component template construction method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113449222A (en) * 2021-06-17 2021-09-28 青岛海尔科技有限公司 Picture display method, picture display device and electronic equipment
CN114296852A (en) * 2021-12-28 2022-04-08 挂号网(杭州)科技有限公司 Method and device for displaying target page, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP5173129B2 (en) Computer program for providing semantic thumbnails
US10339209B2 (en) Webpage display method and device
CN109308155A (en) Adjust method, apparatus, computer equipment and the storage medium of the page
EP2461260A1 (en) Visual treatment for a user interface in a content integration framework
CN107256259B (en) Page display method and device, electronic equipment and storage medium
EP2874054B1 (en) Application text adjusting method, device, and terminal
US20140372874A1 (en) Responsive rendering of data sets
CN110781440A (en) Container height adjusting method and device, computer equipment and storage medium
CN105808307B (en) Page display method and device
KR20200104899A (en) Digital component background rendering
CN113015007A (en) Video frame insertion method and device and electronic equipment
CN107678636A (en) The webpage representation method and apparatus of electronic equipment
CN110825993B (en) Picture display method and device and electronic equipment
CN104793837A (en) Picture generation method and device
CN111045576B (en) Display control method, display control device, terminal equipment and electronic equipment
CN113657408B (en) Method and device for determining image characteristics, electronic equipment and storage medium
CN113362426B (en) Image editing method and image editing device
CN115630241A (en) Page display method and device, electronic equipment and storage medium
CN113296661B (en) Image processing method, device, electronic equipment and readable storage medium
CN114742013A (en) Online document display method and device and electronic equipment
CN106446074A (en) Chart data display apparatus and method
CN109101143B (en) Focus top setting method, storage medium, equipment and system suitable for page scrolling
CN113032696A (en) Display method and display device of page picture
CN111372009A (en) Image processing method and processing equipment
CN110633121A (en) Interface rendering method and device, terminal equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 801-2, floor 8, building 3, No. 22, Ronghua Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Wanghai Kangxin (Beijing) Technology Co.,Ltd.

Address before: Room 07, Room 2, Building B, 12 Hongda North Road, Beijing Daxing District, Beijing

Applicant before: BEIJING NEUSOFT VIEWHIGH TECHNOLOGY Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200211