css writing position of
an internal pattern is introduced inside the head tag a style tags inside style tag write css belong to the internal pattern
or called inline
2 line style
<div style = "font-size : 30px;"> I love learn CSS, because you can make the page become beautification </ div>
inline style with less, under normal circumstances rarely styles can be used inline type
3 external style
<link rel = "stylesheet" href = "index.css" type = "text / css" />
item recommended to use, easy style and structure of the separation and maintenance of
classification css elements in
a stage element
these elements can be on a separate line, the width and height may be provided, if not set width, the default is the father 100% of
such div, p, h1 ~ h6, nav, header, section like
the 2-line elements
these elements side by side (inline elements and inline elements), setting the width and height is invalid, width and height of the expansion of content
, such as span a em strong i like
block 3 rows element
these elements can be set width and height, while in parallel
as input img other
conversion elements css
display: inline; / * other elements within the switch elements * /
the display: block; / * other elements transfected block elements * /
the display: inline- block;/ * Switch to other elements within the block elements * /
css
selectors and style properties
selectors: id tag selector class Selector Selector Selector Wildcard
structural class selector to select pseudo
composite selector (CSS2) intersection selector (tag specifies the formula) and diversity selector descendant selector