词条 | CSS2 |
释义 | CSS2简介样式单自从CSS1的版本之后,又在1998年5月发布了CSS2版本,样式单得到了更多的充实。 CSS2.0是一套全新的样式表结构,是由W3C推行的,同以往的CSS1.0或CSS1.2完全不一样,CSS2.0推荐的是一套内容和表现效果分离的方式,HTML元素可以通过CSS2.0的样式控制显示效果,可完全不使用以往HTML中的table和td来定位表单的外观和样式,只需使用div和 Li此类HTML标签来分割元素,之后即可通过CSS2.0样式来定义表单界面的外观。 CSS2.0提供给我们了一个机制,让程序员开发时可以不考虑显示和界面就可以制作表单和界面,显示问题可由美工或是程序员后期再来编写相应的 CSS2.0样式来解决。不过由于CSS2.0目前尚未见过很好的编辑软件,所以无法做到所见即所得,编写起来不易。 CSS2单位相对长度单位em ex px 绝对长度单位pt pc in cm mm 颜色单位rgb(R,G,B) #RRGGBB Color Name 角度单位deg grad rad 时间单位s ms 频率单位kHz Hz CSS2标准属性属性 取值 azimuth <angle> | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards | inherit center background [background-color || background-image || background-repeat || background-attachment || background-position] | inherit XX background-attachment scroll | fixed | inherit scroll background-color <color> | transparent | inherit transparent background-image <uri> | none | inherit none background-position [ [<percentage> | <length> ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | inherit 0% 0% block-level and replaced elements no refer to the size of the box itself visual background-repeat repeat | repeat-x | repeat-y | no-repeat | inherit repeat border [ border-width || border-style || <color> ] | inherit see individual properties border-collapse collapse | separate | inherit collapse 'table' and 'inline-table' elements yes border-color <color>{1,4} | transparent | inherit see individual properties border-spacing <length> <length>? | inherit 0 'table' and 'inline-table' elements yes border-style <border-style>{1,4} | inherit see individual properties border-top border-right border-bottom border-left [ border-top-width || border-style || <color> ] | inherit see individual properties border-top-color border-right-color border-bottom-color border-left-color <color> | inherit the value of the 'color' property border-top-style border-right-style border-bottom-style border-left-style <border-style> | inherit none border-top-width border-right-width border-bottom-width border-left-width <border-width> | inherit medium border-width <border-width>{1,4} | inherit see individual properties bottom <length> | <percentage> | auto | inherit auto positioned elements no refer to height of containing block visual caption-side top | bottom | left | right | inherit top 'table-caption' elements yes clear none | left | right | both | inherit none block-level elements no clip <shape> | auto | inherit auto block-level and replaced elements no color <color> | inherit depends on user agent content [ <string> | <uri> | <counter> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit empty string :before and :after pseudo-elements no counter-increment [ <identifier> <integer>? ]+ | none | inherit none counter-reset [ <identifier> <integer>? ]+ | none | inherit none cue [ cue-before || cue-after ] | inherit XX cue-after <uri> | none | inherit none cue-before <uri> | none | inherit none cursor [ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ] ] | inherit auto direction ltr | rtl | inherit ltr all elements, but see prose yes display 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 | none | inherit inline elevation <angle> | below | level | above | higher | lower | inherit level empty-cells show | hide | inherit show 'table-cell' elements yes float left | right | none | inherit none all but positioned elements and generated content no font [ [ font-style || font-variant || font-weight ]? font-size [ / line-height ]? font-family ] | caption | icon | menu | message-box | small-caption | status-bar | inherit see individual properties font-family [[ <family-name> | <generic-family> ],]* [<family-name> | <generic-family>] | inherit depends on user agent font-size <absolute-size> | <relative-size> | <length> | <percentage> | inherit medium font-size-adjust <number> | none | inherit none font-stretch normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit normal font-style normal | italic | oblique | inherit normal font-variant normal | small-caps | inherit normal font-weight normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit normal height <length> | <percentage> | auto | inherit auto all elements but non-replaced inline elements, table columns, and column groups no see prose visual left <length> | <percentage> | auto | inherit auto positioned elements no refer to width of containing block visual letter-spacing normal | <length> | inherit normal line-height normal | <number> | <length> | <percentage> | inherit normal list-style [ list-style-type || list-style-position || list-style-image ] | inherit XX elements with 'display: list-item' yes list-style-image <uri> | none | inherit none elements with 'display: list-item' yes list-style-position inside | outside | inherit outside elements with 'display: list-item' yes list-style-type disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha | upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana | katakana | hiragana-iroha | katakana-iroha | none | inherit disc elements with 'display: list-item' yes margin <margin-width>{1,4} | inherit XX margin-top margin-right margin-bottom margin-left <margin-width> | inherit 0 marker-offset <length> | auto | inherit auto elements with 'display: marker' no marks [ crop || cross ] | none | inherit none page context N/A max-height <length> | <percentage> | none | inherit none all elements except non-replaced inline elements and table elements no refer to height of containing block visual max-width <length> | <percentage> | none | inherit none all elements except non-replaced inline elements and table elements no refer to width of containing block visual min-height <length> | <percentage> | inherit 0 all elements except non-replaced inline elements and table elements no refer to height of containing block visual min-width <length> | <percentage> | inherit UA dependent all elements except non-replaced inline elements and table elements no refer to width of containing block visual orphans <integer> | inherit 2 block-level elements yes outline [ outline-color || outline-style || outline-width ] | inherit see individual properties outline-color <color> | invert | inherit invert outline-style <border-style> | inherit none outline-width <border-width> | inherit medium overflow visible | hidden | scroll | auto | inherit visible block-level and replaced elements no padding <padding-width>{1,4} | inherit XX padding-top padding-right padding-bottom padding-left <padding-width> | inherit 0 page <identifier> | auto auto block-level elements yes page-break-after auto | always | avoid | left | right | inherit auto block-level elements no page-break-before auto | always | avoid | left | right | inherit auto block-level elements no page-break-inside avoid | auto | inherit auto block-level elements yes pause [ [<time> | <percentage>]{1,2} ] | inherit depends on user agent pause-after <time> | <percentage> | inherit depends on user agent pause-before <time> | <percentage> | inherit depends on user agent pitch <frequency> | x-low | low | medium | high | x-high | inherit medium pitch-range <number> | inherit 50 play-during <uri> mix? repeat? | auto | none | inherit auto position static | relative | absolute | fixed | inherit static all elements, but not to generated content no quotes [<string> <string>]+ | none | inherit depends on user agent richness <number> | inherit 50 right <length> | <percentage> | auto | inherit auto positioned elements no refer to width of containing block visual size <length>{1,2} | auto | portrait | landscape | inherit auto the page context N/A speak normal | none | spell-out | inherit normal speak-header once | always | inherit once elements that have table header information yes speak-numeral digits | continuous | inherit continuous speak-punctuation code | none | inherit none speech-rate <number> | x-slow | slow | medium | fast | x-fast | faster | slower | inherit medium stress <number> | inherit 50 table-layout auto | fixed | inherit auto 'table' and 'inline-table' elements no text-align left | right | center | justify | <string> | inherit depends on user agent and writing direction block-level elements yes text-decoration none | [ underline || overline || line-through || blink ] | inherit none text-indent <length> | <percentage> | inherit 0 block-level elements yes refer to width of containing block visual text-shadow none | [<color> || <length> <length> <length>? ,]* [<color> || <length> <length> <length>?] | inherit none text-transform capitalize | uppercase | lowercase | none | inherit none top <length> | <percentage> | auto | inherit auto positioned elements no refer to height of containing block visual unicode-bidi normal | embed | bidi-override | inherit normal all elements, but see prose no vertical-align baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit baseline inline-level and 'table-cell' elements no refer to the 'line-height' of the element itself visual visibility visible | hidden | collapse | inherit inherit voice-family [[<specific-voice> | <generic-voice> ],]* [<specific-voice> | <generic-voice> ] | inherit depends on user agent volume <number> | <percentage> | silent | x-soft | soft | medium | loud | x-loud | inherit medium white-space normal | pre | nowrap | inherit normal block-level elements yes widows <integer> | inherit 2 block-level elements yes width <length> | <percentage> | auto | inherit auto all elements but non-replaced inline elements, table rows, and row groups no refer to width of containing block visual word-spacing normal | <length> | inherit normal z-index auto | <integer> | inherit auto positioned elements no |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。