CSS 参考手册CSS背景属性属性描述值background 简写属性,作用是将背景属性设置在一个声明中。
background-color background-image background-repeat background-attachment background-positionbackground-attachment 设置是否背景图像是固定的或随页面其余部分滚动。
scroll fixedbackground-color 设置元素的背景颜色。
color-rgb color-hex color-name transparentbackground-image 将图像设置为背景。
url nonebackground-position 设置背景图像的起始位置。
top lefttop center top right center left center center center right bottom left bottom center bottom right x-% y-%x-pos y-posbackground-repeat 设置背景图像是否及如何重复。
repeat repeat-x repeat-y no-repeatCSS 边框属性(border)属性描述值border 简写属性。
作用是在一个声明中用来设置四个边框的所有属性。
border-width border-style border-colorborder-bottom 简写属性。
作用是在一个声明中用来设置底边框的所有属性。
border-bottom-width border-styleborder-colorborder-bottom-color 设置底边框的颜色。
border-color border-bottom-style 设置底边框的样式。
border-styleborder-bottom-width 设置底边框的宽度。
thin medium thick lengthborder-color 设置四个边框的颜色,可以设置一到四个颜色。
colorborder-left 简写属性。
用于在一个声明中设置左边框的所有属性。
border-left-width border-style border-colorborder-left-color 设置左边框的颜色border-color border-left-style 设置左边框的样式。
border-styleborder-left-width 设置左边框的宽度。
thin medium thick lengthborder-right 简写属性。
将所有用于右边框的属性设置于一个声明中。
border-right-width border-style border-colorborder-right-color 设置右边框的颜色border-color border-right-style 设置右边框的样式border-styleborder-right-width 设置右边框的宽度。
thin medium thick lengthborder-style 设置四个边框的样式,可以设置一到四个样式。
none hidden dotted dashed solid double groove ridge inset outsetborder-top 简写属性。
将所有用于顶边框的属性设置于一个声明中。
border-top-width border-style border-colorborder-top-color 设置顶边框的颜色。
border-color border-top-style 设置顶边框的样式。
border-styleborder-top-width 设置顶边框的宽度。
thin medium thick lengthborder-width 简写属性。
在一个声明中设置四个边框的宽度,可以设置一到四个值。
thinmediumthicklengthCSS文本属性属性描述值color 设置文本颜色colordirection 设置文本方向ltr rtlletter-spacing 增加或减少字符间距normal lengthtext-align 排列元素中的文本left right center justifytext-decoration 向文本添加修饰none underline overline line-through blinktext-indent 缩进元素中文本的首行length %text-shadow none color lengthtext-transform 控制元素中的字母none capitalize uppercase lowercaseunicode-bidi normal embedbidi-overridewhite-space 设置元素中空白的处理方式normal pre nowrapword-spacing 增加或减少字间距normal lengthCSS字体属性(font)属性描述值font 简写属性。
作用是将所有针对字体的属性设置在一个声明中。
font-stylefont-variantfont-weightfont-size/line-height font-family captioniconmenumessage-boxsmall-caption status-barfont-family 字体类型名称或者针对某元素的类属族名名称的优先列表。
family-name generic-familyfont-size 设置字体的尺寸xx-small x-small smallmediumlargex-largexx-largesmallerlargerlength%font-size-adjust 为一个元素规定aspect 值。
none numberfont-stretch 收缩或拉伸当前的字体族。
normalwider narrowerultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expandedfont-style 设置字体样式normal italic obliquefont-variant 以小型小写字体或者正常字体显示文本normal small-capsfont-weight 设置字体的粗细。
normal bold bolder lighter 100 200 300 400 500 600 700 800 900CSS 边距属性(border)属性描述值margin 简写属性。
在一个声明中设置边距属性margin-top margin-right margin-bottom margin-leftmargin-bottom 设置元素的下边距auto length %margin-left 设置元素的左边距auto length %margin-right 设置元素的右边距auto length %margin-top 设置元素的上边距auto length %CSS 填充属性(padding)属性描述值padding 简写属性。
作用是在一个声明中设置元素的填充属性。
padding-top padding-right padding-bottom padding-leftpadding-bottom 设置元素底端的填充length %padding-left 设置元素左侧的填充length %padding-right 设置元素右侧的填充length %padding-top 设置元素顶端的填充length %CSS 列表属性(list)属性描述值list-style 简写属性。
用于将所有用于列表的属性设置于一个声明之中。
list-style-type list-style-position list-style-imagelist-style-image 将图象设置为列表项标记none urllist-style-position 设置列表中列表项标记被放置的位置inside outsidelist-style-type 设置列表项标记的类型nonedisccirclesquaredecimaldecimal-leading-zero lower-romanupper-romanlower-alphaupper-alphalower-greeklower-latinupper-latinhebrewarmenian georgiancjk-ideographic hiragana katakana hiragana-iroha katakana-irohamarker-offset auto length内容生成属性描述值content 生成文档中的内容。
与:before 以及:after伪元素配合使用stringurlcounter(name)counter(name, list-style-type)counters(name, string)counters(name, string, list-style-type)attr(X)open-quoteclose-quoteno-open-quoteno-close-quotecounter-increment 设置每当某个选择器出现时计数器的增加值noneidentifier numbercounter-reset 设置每当某个选择器出现时计数器被设置的值noneidentifier numberquotes 设置引号的类型none string string轮廓属性描述值outline 简写属性。
用来在一个声明中设置所有的outline属性。
outline-coloroutline-styleoutline-widthoutline-color 设置围绕元素的轮廓的颜色color invertoutline-style 设置围绕元素的轮廓的样式none dotted dashed solid double groove ridge inset outsetoutline-width 设置围绕元素的轮廓的宽度thin mediumthicklength CSS 尺寸属性(Dimension)属性描述值height 设置元素高度auto length %line-height 设置行间距normal number length %max-height 设置元素的最大高度none length %max-width 设置元素的最大宽度none length %min-height 设置元素的最小高度length %min-width 设置元素的最小宽度length %width 设置元素的宽度auto % lengthCSS 分类属性(Classification)属性描述值clear 设置不允许存在浮动对象的边left right both nonecursor 规定光标类型(形状)urlauto crosshair default pointer movee-resize ne-resize nw-resize n-resize se-resize sw-resize s-resize w-resize textwaithelpdisplay 设置如何及是否显示某元素noneinlineblocklist-itemrun-incompactmarkertableinline-tabletable-row-group table-header-group table-footer-group table-rowtable-column-group table-column table-celltable-captionfloat 设置图像或文本出现于另一元素中的何处left right noneposition 元素的定位方式:静态、相对定位、绝对定位、固定定位staticrelativeabsolutefixedvisibility 设置元素可见或不可见visible hidden collapseCSS 定位属性(Positioning)属性描述值bottom 设置元素的底边距离其父元素的底边之上或之下的距离。