属性(property)

一、font

property namevalueunitannot
font-size1,2,..PX、cm绝对长度单位:cm,in; 相对长度单位:px,em,%
font-styleitalic,normal
line-heightnormalPX、EM
font-weightbold,lighter,normal
font-variantsmall-caps小型大写字母
text-transformcapitalize,uppercase大小写
text-decorationunderline,overline修饰

二、background

property namevalueunitannot
background-color#FFFFFFrgb色彩
background-imageurl()图片
background-repeatno-repeat重复
background-attachmentfixed;(固定) scroll;(滚动)滚动
background-positionleft(水平) top(垂直);位置

三、Block

property namevalueunitannot
letter-spacingnormal; numrgb字间距
text-alignleft;justify对齐
text-indentnumpx缩进
vertical-aligntext-top;baseline垂直对齐
word-spacingnormal;num词间距

四、Box

property namevalueunitannot
widthnumpx宽度
heightnumpx高度
floatnumpx
marginnumpx外边距
paddingnumpx内边距
bordernumpx边框

五、Border

property namevalueunitannot
border-styledotted;dashed
border-widthnumpx边框宽度
border-color#RGB

六、List-style

property namevalueunitannot
list-style-typedisc;decimal圆点、数字
list-style-positionoutside;inside;
list-style-imageurl

七、Position

property namevalueunitannot
Positionabsolute; relative; static;
visibilityinherit; visible; hidden;
overflowvisible; hidden; scroll; auto;
cliprect(12px,auto,12px,auto)裁切
Categories: Web

1 Comment

CSS学习笔记 – xinzipanghuang.home · 2020年8月15日 at 22:33

[…] css属性总结 […]

Leave a Reply

Your email address will not be published.