Self-adaptive layout method based on BFC characteristics

A layout method and adaptive technology, applied in the field of data processing, to achieve the effect of good compatibility, reducing DMO elements, and reducing the size of web pages

Inactive Publication Date: 2020-04-24
江苏艾佳家居用品有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, using the fluid properties of block elements to implement adaptive layout has obvious shortcomings, that is, you need to know the size of floating or absolutely positioned elements, and then the fluid content can have corresponding margin and padding, or border values ​​for position correction
However, there is no way to simply use a common class name (such as .clearfix) to achieve general adaptation of the whole site, because the blank space and the size of DOM elements are different in different scenarios

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Self-adaptive layout method based on BFC characteristics

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment

[0090] Realize the adaptive layout of pictures and text. Principle: The area of ​​the BFC will not overlap with the float box.

[0091] Implement a left and right column layout. Principle: The area of ​​the BFC will not overlap with the float box, and will expand and narrow automatically according to the width of the containing block and the width of the left float, filling the containing fast area.

[0092] Implement three-column adaptive and canonical Holy Grail layout. The principle is that the BFC area will not overlap with the float box, and the left and right columns are fixed, and the content in the middle will automatically scale with the width of the parent element, so as to achieve self-adaptation

[0093] Clear internal floating principle: When calculating the height of BFC, floating elements also participate in the calculation.

[0094] Summarize the characteristics of BFC: BFC is an isolated and independent container on the page, and the child elements inside t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a self-adaptive layout method based on BFC characteristics, belongs to the field of data processing, and specifically comprises the following steps: realizing self-adaptive layout of pictures and texts; left and right two-column layout is realized; three-column self-adaption and classical holy grail layout is achieved, namely, the left side is fixed, the middle is enlargedand shrunk along with a page, and the right side is fixed; removing internal floating; more powerful and more intelligent multi-column adaptive layout is realized by utilizing the BFC characteristicsof blocky elements. According to the method, pure CSS control is adopted, the method is simpler and more universal, some responsive layouts can be controlled through JS, the webpage size is reduced byreducing DMO elements, the BFC achieves the effect by adding some styles capable of triggering the BFC to an existing layout DOM, and DOM elements are not newly added any more; the method is better in compatibility, and the BFC mainly utilizes the basic attributes of the box model, so that the BFC is compatible with all browsers.

Description

technical field [0001] The invention relates to the field of data processing, in particular to an adaptive layout method based on BFC characteristics. Background technique [0002] Layout is a very important part of web page CSS. The ultimate goal of layout is to build a complete page structure, and it is also an important part of page performance optimization, which will directly affect the user experience of the page. The Box box is the object and basic unit of CSS layout. To put it simply: a page is composed of many Box boxes. The type and display attribute of the element determine the type of the Box. Different types of Box will participate in different FormattingContext (a container that determines how to render the document), so the elements inside the Box will be rendered in different ways. Generally, there are two types of block-level book and inline-level box. In the early days, there were not many types of computer monitor resolutions, and web designers and de...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/958G06F16/957G06F9/451
CPCG06F9/451G06F16/957G06F16/958
Inventor 陈旋王冲毛慧杨涛
Owner 江苏艾佳家居用品有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products