【CSS】Intermediate8:Page Layout

1.Layout with CSS is easy. You just take a chunk of your page and shove it wherever you choose

2.position property

3.static value

renders a box in the normal order of things

4.relative

much like static but the box can be offset from its original position

top/right/bottom/left properties

5.absolute

pulls a box out of normal flow of HTML  & delivers it to a world all of its own

t/r/b/l

6.fixed

like absolute but reference to the browser window as opposed to the web page

Fixed boxes should stay exactly where they are on the screen even when the page is scrolled

How stupidly easy!

7.float

Shift the box to the right or left of a line,with surrounding content flowing around it

l/r value

8.clear

do not want the next box to wrap around the floating objects

l/r/both value

Footer!Hoorah!

原文地址:https://www.cnblogs.com/yzhen/p/3660056.html