CSS元素的使用顺序

咱们书写CSS其实也有一定的顺序可言,大体上说是先位置,再到自身属性。详细看下面。

 

display-->float--clear-->position-->width-->height-->overflow-->margin-->padding-->border-->list-style-type--> ---->font--> background-->opacity-->cursor

 

 

<span style="font-family:Microsoft YaHei;">.cl {
display: ;
visibility: ;//visibility 属性规定元素是否可见。隐藏的元素也会占空间
float: ;
clear: ;

position: ;
top: ;
right: ;
bottom: ;
left: ;
z-index: ;

width: ;
min-width: ;//该属性值会对元素的宽度设置一个最小限制。因此,元素可以比指定值宽,但不能比其窄。不允许指定负值。
max-width: ;
height: ;
min-height: ;
max-height: ;
overflow: ;//overflow 属性规定当内容溢出元素框时发生的事情。

margin: ;
margin-top: ;
margin-right: ;
margin-bottom: ;
margin-left: ;

padding: ;
padding-top: ;
padding-right: ;
padding-bottom: ;
padding-left: ;

border-width: ;
border-top-width: ;
border-right-width: ;
border-bottom-width: ;
border-left-width: ;

border-style: ;
border-top-style: ;
border-right-style: ;
border-bottom-style: ;
border-left-style: ;

border-color: ;
border-top-color: ;
border-right-color: ;
border-bottom-color: ;
border-left-color: ;

outline: ;//outline (轮廓)是绘制于元素周围的一条线,位于边框边缘的外围,可起到突出元素的作用。

list-style-type: ;//list-style-type 属性设置列表项标记的类型。

table-layout: ;在固定表格布局中,水平布局仅取决于表格宽度、列宽度、表格边框宽度、单元格间距,而与单元格的内容无关。在自动表格布局中,列的宽度是由列单元格中没有折行的最宽的内容设定的。
caption-side: ;该属性指定了表标题相对于表框的放置位置。表标题显示为好像它是表之前(或之后)的一个块级元素。
border-collapse: ;如果可能,边框会合并为一个单一的边框。会忽略 border-spacing 和 empty-cells 属性。
border-spacing: ;border-spacing 属性设置相邻单元格的边框间的距离(仅用于“边框分离”模式)。
empty-cells: ;

empty-cells 属性设置是否显示表格中的空单元格(仅用于“分离边框”模式)。

 

font: ;
font-family: ;
font-size: ;
line-height: ;
font-weight: ;
text-align: ;
text-indent: ;
text-transform: ;这个属性会改变元素中的字母大小写,而不论源文档中文本的大小写。
text-decoration: ;
letter-spacing: ;
word-spacing: ;word-spacing 属性增加或减少单词间的空白(即字间隔)。
white-space: ;white-space 属性设置如何处理元素内的空白。
vertical-align: ;vertical-align 属性设置元素的垂直对齐方式。
color: ;

background: ;
background-color: ;
background-image: ;
background-repeat: ;
background-position: ;

opacity: ;

cursor: ;

content: ;
quotes: ;
}</span>

posted @ 2015-08-08 23:45  太SHY  阅读(328)  评论(0)    收藏  举报