CN103699609A - Method and device for adjusting nonstandard elements of grid system - Google Patents

Method and device for adjusting nonstandard elements of grid system Download PDF

Info

Publication number
CN103699609A
CN103699609A CN201310687093.5A CN201310687093A CN103699609A CN 103699609 A CN103699609 A CN 103699609A CN 201310687093 A CN201310687093 A CN 201310687093A CN 103699609 A CN103699609 A CN 103699609A
Authority
CN
China
Prior art keywords
width
outer container
nonstandard elements
elements
nonstandard
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
CN201310687093.5A
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.)
LeTV Information Technology Beijing Co Ltd
Original Assignee
LeTV Information Technology Beijing 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 LeTV Information Technology Beijing Co Ltd filed Critical LeTV Information Technology Beijing Co Ltd
Priority to CN201310687093.5A priority Critical patent/CN103699609A/en
Publication of CN103699609A publication Critical patent/CN103699609A/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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Details Of Rigid Or Semi-Rigid Containers (AREA)

Abstract

The invention discloses a method and a device for adjusting nonstandard elements of a grid system and solves the problem that as larger intervals possibly occur in a peripheral container of the nonstandard elements, webpage display is disordered, and the scheduled effects of the grid system are damaged. The method comprises the steps of determining the number of the nonstandard elements capable of containing an original width in the peripheral container according to the width of the peripheral container, the original width of the nonstandard elements and the designated intervals between adjacent nonstandard elements; determining the display width of the nonstandard elements in the peripheral container according to the width of the peripheral container, the determined number of the nonstandard elements capable of containing the original width in the peripheral container and the designated interval between the adjacent nonstandard elements; displaying the nonstandard elements in the peripheral container with the display width.

Description

A kind of method of adjustment of grid system nonstandard elements and device
Technical field
The present invention relates to web displaying technical field, relate in particular to a kind of method of adjustment and device of grid system nonstandard elements.
Background technology
Webpage grid system " grid systems " develops from planar grid system.For webpage design, the use of grid system, can allow the information of webpage present readability more attractive in appearance.
Grid system be with regular grid array instruct with standard webpage in layout and information distribute, this grid array is stealthy framework, the spacing between a plurality of grids and grid, consists of.Outer container is set in grid system to hold web page element, the width of outer container is: (a+i) k-j; Wherein, the width that a is grid, j is the spacing between grid, and k is the number that outer container accounts for grid, and k is natural number.Web page element can be divided into leading element and nonstandard elements, and the width of leading element is: (a+j) h-j, and wherein, h is the number that leading element accounts for grid, h is natural number.A is the width of a grid, while calculating for each web page element in an outer container and outer container, eka-element is placed in outer container, h is less than or equal to k, and the prescribed distance between each web page element represents with i, i is resulting by the spacing j between grid, and i equates with the spacing j between grid, therefore can be general.And the element that does not meet normal width is nonstandard elements.Between nonstandard elements and its outer container, may there is larger spacing, cause the display effect that web displaying is chaotic, destroy the webpage designing according to original grid system.
Summary of the invention
The method of adjustment and the device that the object of this invention is to provide a kind of grid system nonstandard elements, solve nonstandard elements and may occur larger spacing between its peripheral container, causes the problem that web displaying is chaotic, destroy the effect of original grid system.
The object of the invention is to be achieved through the following technical solutions:
The embodiment of the present invention provides a kind of method of adjustment of grid system nonstandard elements, comprising:
According to the prescribed distance between the original width of the width of outer container, nonstandard elements and adjacent described nonstandard elements, determine the number that can hold the described nonstandard elements of this original width in described outer container;
According to holding the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements in the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container;
With described display width, in described outer container, show described nonstandard elements.
Preferably, according to the prescribed distance between the original width of the width of outer container, nonstandard elements and adjacent described nonstandard elements, determine the number that can hold the described nonstandard elements of this original width in described outer container, with following formula, calculate:
m=(V+i)\(x+i)
Wherein, m can hold the number of the described nonstandard elements of this original width in described outer container, the width that V is described outer container, and i is the prescribed distance between adjacent described nonstandard elements, the described original width that x is described nonstandard elements.
Preferably, according to holding the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements in the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container, with following formula, calculate:
l = x + V - [ m ( x + i ) - i ] m
Wherein, l is the described display width of described nonstandard elements in described outer container.
Preferably, when described nonstandard elements shows with described display width, in the described display width of the described nonstandard elements ratio identical with the ratio of described original width, the original height of described nonstandard elements is adjusted into and shows height.
Preferably, the prescribed distance between described adjacent described nonstandard elements equates with the spacing between adjacent cells.
Embodiment of the present invention beneficial effect is as follows: by judgement different in width container and the number of holding nonstandard elements, adjust the display width that nonstandard elements shows in this container, so that the nonstandard elements of this number can take this container, thus the display effect of raising webpage.
The embodiment of the present invention also provides a kind of adjusting gear of grid system nonstandard elements, comprising:
The first processing unit, for according to the prescribed distance between the original width of the width of outer container, nonstandard elements and described nonstandard elements, determines the number that can hold the described nonstandard elements of this original width in described outer container;
The second processing unit, for can hold the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements according to the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container;
Display unit, for showing described nonstandard elements with described display width at described outer container.
Preferably, described the first processing unit, according to the width of the original width of nonstandard elements and outer container, determines the number that can hold the described nonstandard elements of this original width in described outer container, with following formula, calculates:
m=(V+i)\(x+i)
Wherein, m can hold the number of the described nonstandard elements of this original width in described outer container, the width that V is described outer container, and i is the prescribed distance between adjacent described nonstandard elements, the described original width that x is described nonstandard elements.
Preferably, described the second processing unit, according to holding the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements in the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container, with following formula, calculate:
l = x + V - [ m ( x + i ) - i ] m
Wherein, l is the described display width of described nonstandard elements in described outer container.
Preferably, described display unit also for, when described nonstandard elements shows with described display width, in the described display width of the described nonstandard elements ratio identical with the ratio of described original width, the original height of described nonstandard elements is adjusted into and shows height.
Embodiment of the present invention beneficial effect is as follows: by judgement different in width container and the number of holding nonstandard elements, adjust the display width that nonstandard elements shows in this container, so that the nonstandard elements of this number can take this container, thus the display effect of raising webpage.
Accompanying drawing explanation
The process flow diagram of the method for adjustment of a kind of grid system nonstandard elements that Fig. 1 provides for the embodiment of the present invention;
The structural representation of the adjusting gear of a kind of grid system nonstandard elements that Fig. 2 provides for the embodiment of the present invention.
The original width x of nonstandard elements
The width V of outer container
In outer container, can hold the number m of the nonstandard elements of original width
Spacing i between adjacent cells
Prescribed distance i between adjacent nonstandard elements
The display width l of nonstandard elements
Embodiment
Below in conjunction with Figure of description, the implementation procedure of the embodiment of the present invention is elaborated.It should be noted that same or similar label from start to finish represents same or similar element or has the element of identical or similar functions.Below by the embodiment being described with reference to the drawings, be exemplary, only for explaining the present invention, and can not be interpreted as limitation of the present invention.
In the embodiment of the present invention, relate to grid system and outer container, for example is in understanding, have following explanation: grid system, with regular grid array instruct with standard webpage in layout and information distribute; Outer container, also can be called grid container or container, is for placing the object of element, control in grid system.
Referring to Fig. 1, the embodiment of the present invention provides a kind of method of adjustment of grid system nonstandard elements, comprising:
101, according to the prescribed distance between the original width of the width of outer container, nonstandard elements and adjacent nonstandard elements, determine the number that can hold the nonstandard elements of this original width in outer container.Wherein, the original width of nonstandard elements is that nonstandard elements is without crossing the width of adjusting.
For the outer container of setting, it must be the width of standard, and the computing formula of the width of this outer container is as formula (1):
V=n*a+(n-1)j (1)
Wherein, the width that V is outer container, the width of a grid of a, n is the number of the shared grid of outer container, j is the prescribed distance between adjacent cells.
Because the prescribed distance i between nonstandard elements is that spacing j between adjacent grid obtains, and equate with the spacing j between adjacent cells, therefore, in following formula, j all replaces with i, explanation no longer separately.Therefore, after definite original width x of nonstandard elements and the width V of outer container, can determine the number that can hold the nonstandard elements of this original width in outer container, concrete computing formula, as formula (2):
m=(V+i)\(x+i) (2)
Wherein, m can hold the number of the nonstandard elements of this original width in outer container, the width that V is outer container, and i is the prescribed distance between adjacent nonstandard elements, the original width that x is nonstandard elements.
It should be noted that the m obtaining is an integer rounding downwards.
102, according to holding the number of nonstandard elements of this original width and the prescribed distance between adjacent nonstandard elements in the width of outer container, definite outer container, determine the display width of nonstandard elements in outer container.Wherein, display width is the width of nonstandard elements after adjusting.
According to formula (2), can calculate the white space the spacing between each nonstandard elements, each nonstandard elements in outer container, and then the width of the nonstandard width element after calculate adjusting, as formula (3):
l = x + V - [ m ( x + i ) - i ] m - - - ( 3 )
Wherein, l is the display width of nonstandard elements in outer container.
Formula (3) is described as follows: V-[m (x+i)-i] be the white space the spacing between each nonstandard elements, each nonstandard elements in outer container, the width of this white space divides all the width to m nonstandard elements afterwards in adjustment, to adjust the width of nonstandard elements, and after making m to adjust, nonstandard elements is covered with whole outer container, and after adjusting, the spacing between each nonstandard elements is i; Need to guarantee the nonstandard elements at the two ends of outer container, its outer side will overlap with the side of outer container.
It should be noted that m is is the integer rounding being obtained by formula (2) downwards, therefore can not be directly with formula (2) substitution formula (3), and should be with the m substitution formula (3) after rounding.
103, with display width, in outer container, show nonstandard elements.Preferably, when nonstandard elements shows with display width, in the display width of the nonstandard elements ratio identical with the ratio of original width, the original height of nonstandard elements is adjusted into and shows height.
Embodiment of the present invention beneficial effect is as follows: by judgement different in width container and the number of holding nonstandard elements, adjust the display width that nonstandard elements shows in this container, so that the nonstandard elements of this number can take this container, thus the display effect of raising webpage.
Referring to Fig. 2, the embodiment of the present invention also provides a kind of adjusting gear of grid system nonstandard elements, comprising:
The first processing unit 201, for according to the prescribed distance between the original width of the width of outer container, nonstandard elements and nonstandard elements, determines the number that can hold the nonstandard elements of this original width in outer container;
The second processing unit 202, for can hold the number of nonstandard elements of this original width and the prescribed distance between adjacent nonstandard elements according to the width of outer container, definite outer container, determines the display width of nonstandard elements in outer container;
Display unit 203, for showing nonstandard elements with display width at outer container.
Preferably, display unit 203 also for, when nonstandard elements shows with display width, in the display width of the nonstandard elements ratio identical with the ratio of original width, the original height of nonstandard elements is adjusted into and shows height.
Embodiment of the present invention beneficial effect is as follows: by judgement different in width container and the number of holding nonstandard elements, adjust the display width that nonstandard elements shows in this container, so that the nonstandard elements of this number can take this container, thus the display effect of raising webpage.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.

Claims (9)

1. a method of adjustment for grid system nonstandard elements, is characterized in that, comprising:
According to the prescribed distance between the original width of the width of outer container, nonstandard elements and adjacent described nonstandard elements, determine the number that can hold the described nonstandard elements of this original width in described outer container;
According to holding the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements in the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container;
With described display width, in described outer container, show described nonstandard elements.
2. the method for claim 1, it is characterized in that, according to the prescribed distance between the original width of the width of outer container, nonstandard elements and adjacent described nonstandard elements, determine the number that can hold the described nonstandard elements of this original width in described outer container, with following formula, calculate:
m=(V+i)\(x+i)
Wherein, m can hold the number of the described nonstandard elements of this original width in described outer container, the width that V is described outer container, and i is the prescribed distance between adjacent described nonstandard elements, the described original width that x is described nonstandard elements.
3. method as claimed in claim 2, it is characterized in that, according to holding the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements in the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container, with following formula, calculate:
l = x + V - [ m ( x + i ) - i ] m
Wherein, l is the described display width of described nonstandard elements in described outer container.
4. the method as described in claims 1 to 3 any one, it is characterized in that, when described nonstandard elements shows with described display width, in the described display width of the described nonstandard elements ratio identical with the ratio of described original width, the original height of described nonstandard elements is adjusted into and shows height.
5. the method as described in claims 1 to 3 any one, is characterized in that, the prescribed distance between described adjacent described nonstandard elements equates with the spacing between adjacent cells.
6. an adjusting gear for grid system nonstandard elements, is characterized in that, comprising:
The first processing unit, for according to the prescribed distance between the original width of the width of outer container, nonstandard elements and described nonstandard elements, determines the number that can hold the described nonstandard elements of this original width in described outer container;
The second processing unit, for can hold the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements according to the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container;
Display unit, for showing described nonstandard elements with described display width at described outer container.
7. device as claimed in claim 6, it is characterized in that, described the first processing unit, according to the width of the original width of nonstandard elements and outer container, determine the number that can hold the described nonstandard elements of this original width in described outer container, with following formula, calculate:
m=(V+i)\(x+i)
Wherein, m can hold the number of the described nonstandard elements of this original width in described outer container, the width that V is described outer container, and i is the prescribed distance between adjacent described nonstandard elements, the described original width that x is described nonstandard elements.
8. device as claimed in claim 7, it is characterized in that, described the second processing unit, according to holding the number of described nonstandard elements of this original width and the prescribed distance between adjacent described nonstandard elements in the width of described outer container, definite described outer container, determine the display width of described nonstandard elements in described outer container, with following formula, calculate:
l = x + V - [ m ( x + i ) - i ] m
Wherein, l is the described display width of described nonstandard elements in described outer container.
9. the device as described in claim 6 to 8 any one, it is characterized in that, described display unit also for, when described nonstandard elements shows with described display width, in the described display width of the described nonstandard elements ratio identical with the ratio of described original width, the original height of described nonstandard elements is adjusted into and shows height.
CN201310687093.5A 2013-12-13 2013-12-13 Method and device for adjusting nonstandard elements of grid system Pending CN103699609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310687093.5A CN103699609A (en) 2013-12-13 2013-12-13 Method and device for adjusting nonstandard elements of grid system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310687093.5A CN103699609A (en) 2013-12-13 2013-12-13 Method and device for adjusting nonstandard elements of grid system

Publications (1)

Publication Number Publication Date
CN103699609A true CN103699609A (en) 2014-04-02

Family

ID=50361137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310687093.5A Pending CN103699609A (en) 2013-12-13 2013-12-13 Method and device for adjusting nonstandard elements of grid system

Country Status (1)

Country Link
CN (1) CN103699609A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656556A (en) * 2016-10-21 2017-05-10 黄东 Service processing architecture of information grid system
CN109697264A (en) * 2017-10-23 2019-04-30 腾讯科技(深圳)有限公司 The method for arranging of page elements, calculates equipment and storage medium at device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388037A (en) * 2008-10-27 2009-03-18 阿里巴巴集团控股有限公司 Page layout method and apparatus
US20120317617A1 (en) * 2010-10-01 2012-12-13 Viasat, Inc. Cross domain notification
CN102929603A (en) * 2012-09-28 2013-02-13 用友软件股份有限公司 Interface control arrangement device and interface control arrangement method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388037A (en) * 2008-10-27 2009-03-18 阿里巴巴集团控股有限公司 Page layout method and apparatus
US20120317617A1 (en) * 2010-10-01 2012-12-13 Viasat, Inc. Cross domain notification
CN102929603A (en) * 2012-09-28 2013-02-13 用友软件股份有限公司 Interface control arrangement device and interface control arrangement method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
佚名: "Android实现自适应正方形GridView", 《HTTP://BLOG.CHENGYUNFENG.COM/?P=465》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656556A (en) * 2016-10-21 2017-05-10 黄东 Service processing architecture of information grid system
CN109697264A (en) * 2017-10-23 2019-04-30 腾讯科技(深圳)有限公司 The method for arranging of page elements, calculates equipment and storage medium at device
CN109697264B (en) * 2017-10-23 2023-04-07 腾讯科技(深圳)有限公司 Page element arrangement method and device, computing equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103699608A (en) Page distribution method and device
CN107066439A (en) A kind of method, device and the electronic equipment of custom form control
CN107240384B (en) Display brightness compensation method and device
GB2533029A (en) Systems and methods to graphically display process control system information
CN104184893A (en) System and method for controlling falling gravity center of mobile phone
CN106873925A (en) The display methods and device of label text
WO2015034378A3 (en) An improved method of data visualization and data sorting
WO2013192410A3 (en) Clock objects having visual graphical indicators with interactive time shifting
US20160155427A1 (en) Electronic device for displaying graphical user interface and method thereof
CN103699609A (en) Method and device for adjusting nonstandard elements of grid system
MX2016002426A (en) Content display method and apparatus.
CN109359255A (en) A kind of list data methods of exhibiting and terminal device
CN107833227B (en) Drawing method and system for circular cutting area
CN106339530A (en) Method and system for extracting size information of welded component based on enveloping space
CN104750395A (en) User interface modifying system and modifying method thereof
DE102014119202A1 (en) Data processing method and electronic device
CN104144337A (en) Image displaying method and device of multi-viewpoint stereoscopic display
CN111176530A (en) 3D model display method and device in WeChat applet
CN103699383A (en) Method and device for controlling page presentation
CN102663664A (en) Method for processing supersized texture images
CN103677830A (en) Method and device for determining grid system
CN105094838B (en) A kind of patterned generation method of response type and system
CN110007885A (en) A kind of display control method and device based on mosaic screen
CN108418229A (en) A kind of method and device inhibiting power station point of common coupling voltage fluctuation
CN107861787A (en) Event schdules statistics and display methods based on the filling of figure color

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140402

RJ01 Rejection of invention patent application after publication