IT Band of Brothers HTML5 page layouts and tutorials about CSS properties

5f16a58a57bc47108e1c532aebeafd05.jpg

 

Use DIV + CSS web pages before a standardized layout, in addition to master the box model, but also to master two of the more important concepts of positioning and floating, they can control the way the elements are arranged and displayed on the page. A box fitted with block content, if a plurality of boxes used in combination, then, can be carried out by positioning the entire page layout and setting floating. By a plurality of page layout shown in FIG. 1 cartridge, a dotted line frame represents each box model.

image/20191206/bbc222bdd22b580fd9420a74b1eb4793.png

FIG 1 a plurality of boxes defined page layouts

 

Although CSS style property is very large, but the actual layout of the page properties involved actually very little. The CSS positioning properties is used extensively, the control element can be planar or spatial positions, and the height, width, and visibility. CSS may also be used to change the type of display property generated block, for example, the display attribute is set to none, this block will no longer block and all contents displayed. By the display property to block, allow inline elements behave like block-level elements of the same. Common CSS properties involved in page layout are shown in Table 1.

Table 1 common CSS properties involved in page layout

 

image/20191206/c66a8b430934a0ec6f72abae034b4802.png

    

It provides relative and absolute both targeting methods, in the CSS. The so-called relative positioning means allows the operator to shift the elements in position relative to other elements on, and absolute positioning means so that the operating elements of the original document reference offset. Table 2-2 Examples of attribute code portion is positioned as follows:

image/20191206/c69b595eb06dbe764c1691e057756c0d.png

Guess you like

Origin www.cnblogs.com/itxdl/p/12008976.html