入门系列4

 
1,font组合:   font:12px/20px 宋体;    (font-size / font-height  font-family)
 
2,CSS优点:
     排版属性功能完整、排版文件可以独立存在、可以共用排版文件
 
3,CSS样式排版分类
     行内排版样式: <标记名称 style="属性:属性值;"></标记名称>
     内嵌式排版样式: <style></style> 之间
     外部排版样式 : <link  rel="stylesheet" type="text/css" href=""/>
     导入式排版样式:<stype="text/css">@imprt "style.css"</style>
 
4,排版专用标记:
     div : 区块级
     span : 内联级
 
5,排版样式的功能分为三种:
     标记定义型: <style type="text/css"> 标记名称 { 属性1:属性值1; }</style>
     class定义型:<style type="text/css"> .定义名称 { 属性1:属性值1; }</style>
     id定义型:<style type="text/css"> #定义名称 { 属性1:属性值1; }</style>
 
6.排版样式的优先级:     
     就近原则: 范围越小,优先级越高
     行内样式 < id定义型 < class定义型< 标记定义型
 
 
 
 
 
 
 
 
 
 
 
 
 
原文地址:https://www.cnblogs.com/namedL/p/8513025.html