CSS2参考手册.doc_第1页
CSS2参考手册.doc_第2页
CSS2参考手册.doc_第3页
CSS2参考手册.doc_第4页
CSS2参考手册.doc_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

快速导航: 背景 文本 字体 边框 外边距 内边距 列表和标记 内容生成 轮廓 尺寸 分类 定位 表格 伪类 伪元素 缩写:浏览器支持:IE: Internet Explorer, F: Firefox, N: Netscape。W3C:“W3C” 列的数字显示出属性由哪个 CSS 标准定义(CSS1 还是 CSS2)。CSS 背景属性属性描述值IEFNW3Cbackground简写属性,作用是将背景属性设置在一个声明中。 background-color background-image background-repeat background-attachment background-position 4161background-attachment背景图像是否固定或者随着页面的其余部分滚动。 scroll fixed 4161background-color设置元素的背景颜色。 color-rgb color-hex color-name transparent 4141background-image把图像设置为背景。 url none 4141background-position设置背景图像的起始位置。 top left top center top right center left center center center right bottom left bottom center bottom right x-% y-% x-pos y-pos 4161background-repeat设置背景图像是否及如何重复。 repeat repeat-x repeat-y no-repeat 4141CSS 边框属性 (border)属性描述值IEFNW3Cborder简写属性。作用是在一个声明中用来设置四个边框的所有属性。 border-width border-style border-color 4141border-bottom简写属性。作用是在一个声明中用来设置下边框的所有属性。 border-bottom-width border-style border-color 4161border-bottom-color设置下边框的颜色。border-color4162border-bottom-style设置下边框的样式。border-style4162border-bottom-width设置下边框的宽度。 thin medium thick length 4141border-color设置四个边框的颜色,可以设置一到四个颜色。color4161border-left简写属性。用于在一个声明中设置左边框的所有属性。 border-left-width border-style border-color 4161border-left-color设置左边框的颜色。border-color4162border-left-style设置左边框的样式。border-style4162border-left-width设置左边框的宽度。 thin medium thick length 4141border-right简写属性。将所有用于右边框的属性设置于一个声明中。 border-right-width border-style border-color 4161border-right-color设置右边框的颜色border-color4162border-right-style设置右边框的样式border-style4162border-right-width设置右边框的宽度。 thin medium thick length 4141border-style设置四个边框的样式,可以设置一到四个样式。 none hidden dotted dashed solid double groove ridge inset outset 4161border-top简写属性。将所有用于上边框的属性设置于一个声明中。 border-top-width border-style border-color 4161border-top-color设置上边框的颜色。border-color4162border-top-style设置上边框的样式。border-style4162border-top-width设置上边框的宽度。 thin medium thick length 4141border-width简写属性。在一个声明中设置四个边框的宽度,可以设置一到四个值。 thin medium thick length 4141CSS 文本属性属性描述值IEFNW3Ccolor设置文本颜色。color3141direction设置文本方向。 ltr rtl 6162letter-spacing设置字符间距。 normal length 4161text-align对齐元素中的文本。 left right center justify 4141text-decoration向文本添加修饰。 none underline overline line-through blink 4141text-indent缩进元素中文本的首行。 length % 4141text-shadow none color length text-transform控制元素中的字母。 none capitalize uppercase lowercase 4141unicode-bidi设置文本方向。 normal embed bidi-override 52white-space设设置元素中空白的处理方式。 normal pre nowrap 5141word-spacing设置字间距。 normal length 6161CSS 字体属性 (font)属性描述值IEFNW3Cfont 简写属性。作用是将所有针对字体的属性设置在一个声明中。 font-style font-variant font-weight font-size/line-height font-family caption icon menu message-box small-caption status-bar 4141font-family 字体类型名称或者针对某元素的类属族名名称的优先列表。 family-name generic-family 3141font-size 设置字体的尺寸。 xx-small x-small small medium large x-large xx-large smaller larger length % 3141font-size-adjust 为元素规定 aspect 值。none number -2font-stretch 收缩或拉伸当前的字体族。 normal wider narrower ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded -2font-style 设置字体样式。 normal italic oblique 4141font-variant 以小型小写字体或者正常字体显示文本 normal small-caps 4161font-weight 设置字体的粗细。 normal bold bolder lighter 100 200 300 400 500 600 700 800 900 4141CSS 外边距属性 (margin)属性描述值IEFNW3Cmargin 简写属性。在一个声明中设置外边距属性。 margin-top margin-right margin-bottom margin-left 4141margin-bottom设置元素的下外边距。 auto length % 4141margin-left设置元素的左外边距。 auto length % 3141margin-right设置元素的右外边距。 auto length % 3141margin-top 设置元素的上外边距。 auto length % 3141CSS 内边距属性 (padding)属性描述值IEFNW3Cpadding简写属性。作用是在一个声明中设置元素的内边距属性。 padding-top padding-right padding-bottom padding-left 4141padding-bottom设置元素的下内边距。 length % 4141padding-left设置元素的左内边距。 length % 4141padding-right设置元素的右内边距。 length % 4141padding-top设置元素的上内边距。 length % 4141CSS 列表属性 (list)属性描述值IEFNW3Clist-style简写属性。用于将所有用于列表的属性设置于一个声明之中。 list-style-type list-style-position list-style-image 4161list-style-image将图象设置为列表项标记。 none url 4161list-style-position设置列表中列表项标记被放置的位置。 inside outside 4161list-style-type设置列表项标记的类型。 none disc circle square decimal decimal-leading-zero lower-roman upper-roman lower-alpha upper-alpha lower-greek lower-latin upper-latin hebrew armenian georgian cjk-ideographic hiragana katakana hiragana-iroha katakana-iroha 4141marker-offset auto length 172内容生成属性描述值IEFNW3Ccontent 生成文档中的内容。与 :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-quote162counter-increment 设置某个选取器每次出现的计数器增量。noneidentifier number2counter-reset 设置某个选择器出现次数的计数器的值。noneidentifier number2quotes 设置引号的类型。nonestring string-162轮廓属性描述值IEFNW3Coutline 简写属性。用来在一个声明中设置所有的 outline 属性。outline-coloroutline-styleoutline-width-1.5-2outline-color 设置围绕元素的轮廓的颜色。colorinvert-1.5-2outline-style 设置围绕元素的轮廓的样式。nonedotteddashedsoliddoublegrooveridgeinsetoutset-1.5-2outline-width 设置围绕元素的轮廓的宽度。thinmediumthicklength-1.5-2CSS 尺寸属性 (Dimension)属性描述值IEFNW3Cheight设置元素高度。 auto length % 4161line-height设置行间距。 normal number length % 4141max-height设置元素的最大高度。 none length % -162max-width设置元素的最大宽度。 none length % -162min-height设置元素的最小高度。 length % -162min-width设置元素的最小宽度。 length % -162width设置元素的宽度。 auto % length 4141CSS 分类属性 (Classification)属性描述值IEFNW3Cclear设置不允许存在浮动对象的边 left right both none 4141cursor规定光标类型(形状) url auto crosshair default pointer move e-resize ne-resize nw-resize n-resize se-resize sw-resize s-resize w-resize text wait help 4162display设置如何及是否显示某元素 none inline block list-item run-in compact marker table inline-table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption 4141float设置图像或文本出现于另一元素中的何处 left right none 4141position元素的定位方式:静态、相对定位、绝对定位、固定定位 static relative absolute fixed 4142visibility设置元素可见或不可见 visible hidden collapse 4162CSS 定位属性 (Positioning)属性描述值IEFNW3Cbottom设置定位元素下外边距边界与其包含块下边界之间的偏移。 auto % length 5162clip设置元素的形状。 shape auto 4162left设置定位元素左外边距边界与其包含块左边界之间的偏移。 auto % length 4142overflow设置当元素的内容溢出其区域时发生的事情。 visible hidden scroll auto 4162position把元素放置到一个静态的、相对的、绝对的、或固定的位置中。 static relative absolute fixed 4142right设置定位元素右外边距边界与其包含块右边界之间的偏移。 auto % length 5162top设置定位元素的上外边距边界与其包含块上边界之间的偏移。 auto % length 4142vertical-align设置元素的垂直排列。 baseline sub super top text-top middle bottom text-bottom length % 4141z-index设置元素的堆叠顺序。 auto number 4162CSS 表格属性属性描述border-collapse设置是否把表格边框合并为单一的边框。border-spacing设置分隔单元格边框的距离。(仅用于 separated borders 模型)caption-side设置表格标题的位置。empty-cells设置是否显示表格中的空单元格。(仅用于 separated borders 模型)table-layout设置显示单元、行和列的算法。CSS 伪类伪类作用IEFNW3C:active将样式添加到被激活的元素。4181:focus将样式添加到被选中的元素。-2:hover当鼠标悬浮在元素上方时,向元素添加样式。4171:link将特殊的样式添加到未被访问过的链接。3141:visited将特殊的样式添加到被访问过的链接。3141:first-child将特殊的样式添加到元素的第一个子元素。172:lang允许创作者来定义指定的元素中使用的语言。182CSS 伪元素伪元素作用IEFNW3C:first-letter向文本的第一个字母添加特殊样式。5181:first-line向文本的首行添加特殊样式。5181:before在元素内容之前插入内容。1.582:after在元素内容之后插入内容。1.582打印属性打印 HTML 文档总是会出现问题。在 CSS2 中,我们可以借助打印属性让打印 web 内容更容易一些。属性描述值orphans设置元素放在页面底部时所允许的最少文本行数。numbermarks设置是否在内容区之外但是在画布的可打印区域内放“十字标志”。请注意,CSS2.1 已删除该属性。 none crop cross page这个属性与 size 属性结合可以指定打印一个元素时所用的特定页面类型。请注意,CSS2.1 已删除该属性。auto identifierpage-break-after设置元素后是否应当放置分页符。 auto always avoid left right page-break-before设置元素前否应当放置分页符。 auto always avoid left right page-break-inside设置元素内部是否应当放置分页符。 auto avoid size利用这个属性,创作人员可以声明打印一个元素时所用页框的大小和方向。它可以与 page 结合使用。不过并不要求一定如此。请注意,CSS2.1 已删除该属性。 auto portrait landscape widows设置元素放在页面顶部时所允许的最少文本行数。numberCSS2 听觉参考W3C : W3C 列的数字显示出属性由哪个 CSS 标准定义(CSS1 还是 CSS2)。属性描述值W3CazimuthSets where the sound/voices should come from (horizontally) angle left-side far-left left center-left center center-right right far-right right-side behind leftwards rightwards 2cueA shorthand property for setting the cue-before and cue-after properties in one declaration cue-before cue-after 2cue-afterSpecifies a sound to be played after speaking an elements content to delimit it from other none url 2cue-beforeSpecifies a sound to be played before speaking an elements content to delimit it from other none url 2elevationSets where the sound/voices should come from (vertically) angle below level above higher lower 2pauseA shorthand property for setting the pause-before and pause-after properties in one declaration pause-before pause-after 2pause-afterSpecifies a pause after speaking an elements content time % 2pause-beforeSpecifies a pause before speaking an elements content time % 2pitchSpecifies the speaking voice frequency x-low low medium high x-high 2pitch-rangeSpecifies the variation in the speaking voice. (Monotone voice or animated voice?) number2play-duringSpecifies a sound to be played while speaking an elements content auto none url mix repeat 2richnessSpecifies the richness in the speaking voice. (Rich voice or thin voice?) number2speakSpecifies whether content will render aurally normal none spell-out 2speak-headerSpecifies how to handle

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论