css- adaptation layout type - flow layout - layout response

The production of mobile phone interface, in accordance with generally twice the size to do it.

If the width is greater than the width of the display device can be adapted to make a

Here Insert Picture Description

Fluid layout

Here Insert Picture Description

For example, experience

Here Insert Picture Description

Here Insert Picture Description

Code
Here Insert Picture Description

PC end adaptable

Here Insert Picture Description

Here Insert Picture Description

Mobile end

Here Insert Picture Description

Computer, the mobile terminal displays properly

Suppose, a label to each frame added

effect

Here Insert Picture Description

Expected Effects

Here Insert Picture Description

Here Insert Picture Description

Solution, a

calc function, minus the percentage of the multi-pixel value

The left frame 2 right frame 2, a plurality of each of the four pixels, like lost
Here Insert Picture Description

Two solutions

Here Insert Picture Description
Setting box-sizing: border-box

Changes in dimensions of the box is calculated

The range of the width and height of the box are defined

Here Insert Picture Description

Responsive layout

Flow layout, according to the size of the wide-mouth adapter

But the bottom line will be

Is desirable, when the wide mouth small time constant

If the four line display, one layout change mode, two display line

Here Insert Picture Description

Here Insert Picture Description

Row shows four tranches

Here Insert Picture Description
Content 23 (including the border)

Responsive experience
Here Insert Picture Description

Here Insert Picture Description

When the width is less than four hundred

Here Insert Picture Description

Watch phone

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/ifubing/article/details/94593597