basic of css
- css if s stylesheet language that describes the presentation of web pages
- colors , backgrounds , font sizes, layouts
*content layer(html) , present layer(css), behavior layer(javascript) - css reference :
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
https://docs.webplatform.org/wiki/css
http://www.w3.org/Style/CSS/
http://caniuser.com - Methods of Adding Author Styles
- Inline Styles
- Internal Styles
- External Style Sheet
- css 引用:
- universal selector:
- selector:
- id selector :
- class selector:
- 一个元素可以有多个css class :
- group selector:
-
id比class更消耗,尽量使用class,避免id和class中属性重复
-
descendant selectors:
- Pseudo -classes:
https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
- Pixel Units - css pixel "px" : An abstract reference unit
-
Percentages - the percentage value is measured relative to a parent element`s length
-
Em Units - 1em is equal to the font-size value of the parent element;
-
Rem Units - equal to the the font-size value of the root element
-
color units
-
text Styles : text-transform, text-decoration, font-weight
-
font Properties: font-falmily
20CB2E0A-E0B6-4E5A-8412-3564E4A59489.png
(依次查询哪个可用)
-
Line Height
- box model : padding,boder,margin,display values(inline, block)
-
box-sizing:border-box
-
background: background-color background-image backgrount-repeat background-position background-size
网友评论