收藏 分销(赏)

CSS-2.0-中文手册.doc

上传人:w****g 文档编号:1994188 上传时间:2024-05-13 格式:DOC 页数:172 大小:1.69MB 下载积分:20 金币
下载 相关 举报
CSS-2.0-中文手册.doc_第1页
第1页 / 共172页
CSS-2.0-中文手册.doc_第2页
第2页 / 共172页


点击查看更多>>
资源描述
1 DHTMLET - Cascading Style Sheet 2.0 中文手册 Table of Contents 1. 简介 Introducing 7 1.1 样式表简介 Introduction to CSS2 7 1.2 关于本手册 About this handbook 8 1.3 苏沈小雨 About rain1977 9 2. 属性 Properties 10 2.1 字体 Font 13 2.1.1 font 14 2.1.2 color 15 2.1.3 font-family 16 2.1.4 font-size 16 2.1.5 font-size-adjust 17 2.1.6 font-stretch 17 2.1.7 font-style 18 2.1.8 font-weight 19 2.1.9 text-decoration 19 2.1.10 text-underline-position 20 2.1.11 text-shadow 21 2.1.12 font-variant 21 2.1.13 text-transform 22 2.1.14 line-height 23 2.1.15 letter-spacing 23 2.1.16 word-spacing 24 2.2 文本 Text 25 2.2.1 text-indent 27 2.2.2 text-overflow 27 2.2.3 vertical-align 28 2.2.4 text-align 29 2.2.5 layout-flow 29 2.2.6 writing-mode 30 2.2.7 direction 31 2.2.8 unicode-bidi 31 2.2.9 word-break 32 2.2.10 line-break 33 2.2.11 white-space 33 2.2.12 word-wrap 34 2.2.13 text-autospace 35 2.2.14 text-kashida-space 35 2.2.15 text-justify 36 2.2.16 ruby-align 36 2.2.17 ruby-overhang 37 2.2.18 ruby-position 38 2.2.19 ime-mode 39 2.2.20 layout-grid 40 2.2.21 layout-grid-char 40 2.2.22 layout-grid-char-spacing 41 2.2.23 layout-grid-line 41 2.2.24 layout-grid-mode 42 2.2.25 layout-grid-type 43 2.3 背景 Background 43 2.3.1 background 44 2.3.2 background-attachment 45 2.3.3 background-color 45 2.3.4 background-image 46 2.3.5 background-position 46 2.3.6 background-positionX 47 2.3.7 background-positionY 48 2.3.8 background-repeat 48 2.3.9 layer-background-color 49 2.3.10 layer-background-image 49 2.4 定位 Positioning 50 2.4.1 position 50 2.4.2 z-index 51 2.4.3 top 52 2.4.4 right 52 2.4.5 bottom 53 2.4.6 left 53 2.5 尺寸 Dimensions 54 2.5.1 height 55 2.5.2 max-height 56 2.5.3 min-height 56 2.5.4 width 57 2.5.5 max-width 58 2.5.6 min-width 58 2.6 布局 Layout 59 2.6.1 clear 60 2.6.2 float 61 2.6.3 clip 62 2.6.4 overflow 62 2.6.5 overflow-x 63 2.6.6 overflow-y 64 2.6.7 display 65 2.6.8 visibility 66 2.7 外补丁 Margins 67 2.7.1 margin 67 2.7.2 margin-top 68 2.7.3 margin-right 69 2.7.4 margin-bottom 69 2.7.5 margin-left 70 2.8 轮廓 Outlines 71 2.8.1 outline 71 2.8.2 outline-color 72 2.8.3 outline-style 72 2.8.4 outline-width 73 2.9 边框 border 73 2.9.1 border 74 2.9.2 border-color 75 2.9.3 border-style 76 2.9.4 border-width 77 2.9.5 border-top 78 2.9.6 border-top-color 78 2.9.7 border-top-style 79 2.9.8 border-top-width 79 2.9.9 border-right 80 2.9.10 border-right-color 81 2.9.11 border-right-style 81 2.9.12 border-right-width 82 2.9.13 border-bottom 83 2.9.14 border-bottom-color 83 2.9.15 border-bottom-style 84 2.9.16 border-bottom-width 85 2.9.17 border-left 85 2.9.18 border-left-color 86 2.9.19 border-left-style 86 2.9.20 border-left-width 87 2.10 内容 Generated Content 88 2.10.1 include-source 89 2.10.2 quotes 89 2.10.3 content 90 2.10.4 counter-increment 91 2.10.5 counter-reset 91 2.11 内补丁 Paddings 92 2.11.1 padding 92 2.11.2 padding-top 93 2.11.3 padding-right 94 2.11.4 padding-bottom 94 2.11.5 padding-left 95 2.12 列表 Lists 96 2.12.1 list-style 96 2.12.2 list-style-image 97 2.12.3 list-style-position 97 2.12.4 list-style-type 98 2.12.5 marker-offset 99 2.13 表格 table 100 2.13.1 border-collapse 101 2.13.2 border-spacing 101 2.13.3 caption-side 102 2.13.4 empty-cells 103 2.13.5 table-layout 103 2.13.6 speak-header 104 2.14 滚动条 Scrollbar 104 2.14.1 scrollbar-3d-light-color 105 2.14.2 scrollbar-highlight-color 106 2.14.3 scrollbar-face-color 106 2.14.4 scrollbar-arrow-color 107 2.14.5 scrollbar-shadow-color 108 2.14.6 scrollbar-dark-shadow-color 108 2.14.7 scrollbar-base-color 109 2.15 打印 Printing 110 2.15.1 page 111 2.15.2 page-break-after 111 2.15.3 page-break-before 112 2.15.4 page-break-inside 112 2.15.5 marks 113 2.15.6 orphans 114 2.15.7 size 114 2.15.8 widows 115 2.16 声音 Aural 115 2.16.1 voice-family 117 2.16.2 volume 117 2.16.3 elevation 118 2.16.4 azimuth 119 2.16.5 stress 120 2.16.6 richness 120 2.16.7 speech-rate 121 2.16.8 cue 121 2.16.9 cue-after 122 2.16.10 cue-before 123 2.16.11 pause 123 2.16.12 pause-after 124 2.16.13 pause-before 124 2.16.14 pitch 125 2.16.15 pitch-range 125 2.16.16 play-during 126 2.16.17 speak 127 2.16.18 speak-numeral 127 2.16.19 speak-punctuation 128 2.17 其它 Classification 128 2.17.1 cursor 129 2.17.2 behavior 130 2.17.3 filter 130 2.17.4 zoom 131 3. 选择符 Selectors 132 3.1 通配选择符 Universal Selector 133 3.2 类型选择符 Type Selectors 133 3.3 属性选择符 Attribute Selectors 134 3.4 包含选择符 Descendant Selectors 134 3.5 子对象选择符 Child Selectors 135 3.6 ID选择符 ID Selectors 135 3.7 类选择符 Class Selectors 136 3.8 选择符分组 Grouping 137 4. 伪类 Pseudo-Classes 137 4.1 :link 138 4.2 :hover 138 4.3 :active 139 4.4 :visited 139 4.5 :focus 140 4.6 :first-letter 140 4.7 :first-line 141 4.8 :first-child 141 4.9 :first 142 4.10 :left 142 4.11 :right 143 4.12 :lang 143 5. 伪对象 Pseudo-Elements 143 5.1 :before 144 5.2 :after 144 6. 规则 At-Rules 145 6.1 @import 145 6.2 @charset 146 6.3 @font-face 146 6.4 @fontdef 147 6.5 @page 147 6.6 @media 148 7. 声明 Declaration 148 7.1 !important 149 8. 单位 Units 149 8.1 长度 Length 150 8.1.1 px 150 8.1.2 em 151 8.1.3 ex 151 8.1.4 pt 152 8.1.5 pc 152 8.1.6 in 152 8.1.7 mm 153 8.1.8 cm 153 8.2 颜色 Color 154 8.2.1 rgb(RGB) 154 8.2.2 #RRGGBB 155 8.2.3 Color Name 155 8.3 角度 Angle 156 8.3.1 deg 156 8.3.2 grad 156 8.3.3 rad 157 8.4 时间 Time 157 8.4.1 s 158 8.4.2 ms 158 8.5 频率 Frequency 158 8.5.1 Hz 159 8.5.2 kHz 159 9. 附录 Appendix 160 9.1 颜色表 Color Table 160 9.2 设备类型 Media Types 161 9.3 字符集识别 Character Set Recognition 161 9.4 ISO Latin-1字符集 ISO Latin-1 Character Set 173 9.5 HTML附加命名实体 177 9.6 特殊文本和BIDI文本的字符实体 183 10. Addenda 184 10.1 184 10.2 DHTMLET - Cascading Style Sheet 2.0 中文手册 185 1. 简介 Introducing 简介 Introduction(See 1.1) 选择符 Selector(See 3.) 伪类 Pseudo-Classes(See 4.) 伪对象 Pseudo-Elements(See 5.) 规则 At-Rules(See 6.) 声明 Declaration(See 7.) 属性 Properties(See 2.) 单位 Units(See 8.) DHTMLET.COM RAIN1977.COMER 关于本手册(See 1.2) 关于苏沈小雨(See 1.3) 安装DHTMLET频道 设DHTMLET为默认首页 ︱  样式表中文手册  (See 1.)︱  在线资源  (See 1.)︱  关于  (See 1.)︱  设置  (See 1.)︱  信箱   (See 1.2) 1.1 样式表简介 Introduction to CSS2 Introduction To CSS2样式表简介 说明: 本手册针对的是已有一定网页设计制作经验的读者。其目的是提供最新最全的样式表内容的快速索引及注释。所以对于样式表的基础知识,在此仅简单介绍,恕不赘述。 本手册的升级信息与版权声明请参阅关于本书(See 1.2)页面。本手册中专用词汇请参阅中英文词汇对照表(See 1.2)。 限于篇幅,对于一些过于繁杂的相关内容,如动态样式属性(Dynamic Properties),滤镜(Filters(See 2.17.3)),行为(Behaviors(See 2.17.2))请参阅我的其它相关著作。 本书中涉及到的所有HTML对象(Object,Element),HTML特性(Attributes)和属性(Properties)请参阅我的相关著作。 什么是样式表 CSS是Cascading Style Sheet 的缩写。译作「层叠样式表单」。是用于(增强)控制网页样式并允许将样式信息与网页内容分离的一种标记性语言。 如何将样式表加入您的网页 你可以用以下三种方式将样式表加入您的网页。而最接近目标的样式定义优先权越高。高优先权样式将继承低优先权样式的未重叠定义但覆盖重叠的定义。例外请参阅important(See 7.1)声明。 链入外部样式表文件 (Linking to a Style Sheet) 你可以先建立外部样式表文件(.css),然后使用HTML的link对象。示例如下: <head> <title>title of article</title> <link rel=stylesheet href=" type="text/css"> </head> 而在XML中,你应该如下例所示在声明区中加入: <? xml-stylesheet type="text/css" href=" ?>> 定义内部样式块对象 (Embedding a Style Block) 你可以在你的HTML文档的<HTML>和<BODY>标记之间插入一个<STYLE>...</STYLE>块对象。 定义方式请参阅样式表语法。示例如下: <html> <style type="text/css"> <!-- body {font: 10pt "Arial"} h1 {font: 15pt/17pt "Arial"; font-weight: bold; color: maroon} h2 {font: 13pt/15pt "Arial"; font-weight: bold; color: blue} p {font: 10pt/12pt "Arial"; color: black} --> </style> <body> 请注意,这里将style对象的type属性设置为"text/css",是允许不支持这类型的浏览器忽略样式表单。 内联定义 (Inline Styles) 内联定义即是在对象的标记内使用对象的style属性定义适用其的样式表属性。示例如下: <p style="margin-left: 0.5in; margin-right:0.5in">这一行被增加了左右的外补丁<p> 样式表语法 (CSS Syntax) Selector { property: value } 参数说明: Selector -- 选择符(See 3.) property : value -- 样式表定义。属性和属性值之间用冒号(:)隔开。定义之间用分号(;)隔开 继承的值 (The ' Inherit ' Value) 每个属性都有一个指定的值:Inherit。它的意思是:将父对象的值等同为计算机值得到。这个值通常仅仅是备用的。显式的声明它可用来强调。 1.2 关于本手册 About this handbook 简介 Introduction(See 1.1) 选择符 Selector(See 3.) 伪类 Pseudo-Classes(See 4.) 伪对象 Pseudo-Elements(See 5.) 规则 At-Rules(See 6.) 声明 Declaration(See 7.) 属性 Properties(See 2.) 单位 Units(See 8.) DHTMLET.COM RAIN1977.COMER 关于本手册(See 1.2) 关于苏沈小雨(See 1.3) 安装DHTMLET频道 设DHTMLET为默认首页 ︱  样式表中文手册  (See 1.)︱  在线资源  (See 1.)︱  关于  (See 1.)︱  设置  (See 1.)︱  信箱     About this handbook   版权声明(COPYRIGHT) 本手册由苏沈小雨(See 1.3)整理,翻译,编写。版权所有者为苏沈小雨。 您可以免费的使用、分发本手册。但未经苏沈小雨的授权许可不得擅自进行篡改、反编译,及将其全部或部分用于商业用途。 本手册受著作权法和国际公约的保护,作者保留对本手册及本声明的最终修改权。 本手册的部分内容参考了Mainsoft(R)及World Wide Web Consortium (W3C)公开的网络文档。 本手册使用Mainsoft(R)的HTML Help格式制作。 er是苏沈小雨使用的个人标识。dhtmlet是苏沈小雨的个人网站使用的标识。   版本更新(UPDATE) 本手册当前版本时间为2001年4月1日。手册中的内容在此日期后发生的变动或更新将在本手册的更新版本中出现。 您可以随时访问我的网站检查并获取更新版本。 您也可以给我写电子邮件咨询及洽谈商业合作。关于我的介绍您可以在关于苏沈小雨(See 1.3)页面获得。 1.3 苏沈小雨 About rain1977 简介 Introduction(See 1.1) 选择符 Selector(See 3.) 伪类 Pseudo-Classes(See 4.) 伪对象 Pseudo-Elements(See 5.) 规则 At-Rules(See 6.) 声明 Declaration(See 7.) 属性 Properties(See 2.) 单位 Units(See 8.) DHTMLET.COM RAIN1977.COMER 关于本手册(See 1.2) 关于苏沈小雨(See 1.3) 安装DHTMLET频道 设DHTMLET为默认首页 ︱  样式表中文手册  (See 1.)︱  在线资源  (See 1.)︱  关于  (See 1.)︱  设置  (See 1.)︱  信箱   About rain1977   简历(Vita) 1996 - 1999    中国航空油料分安徽公司(CAOSC) 1999 - 2000    北京清华园中文在线网络技术有限公司() 2000 --           上海榕树下计算机有限公司() 自述(Intro) 精通脚本(JScripts)、样式表(CSS)、HTML4.0等技术。有专业的手写代码、优化网页、脚本编程、图片处理、网站策划的能力。 有丰富的独立或合作项目经验。能够熟练使用或很快上手任何常见的和网页制作有关的代码编辑、图片处理等工具软件。 并有较高一定的文学水平。 希望寻求网页设计制作,团队项目合作,教材编写等工作机会。有意者请与我联系。 联络方式 主页: 、 信箱: rainer@、rainer@、rainer@ 电话: 13916616163(上海) 邮寄地址:上海市北京西路1399号建京大厦12楼E3 榕树下 苏昱(小雨)收 邮政编码:200040 2. 属性 Properties CSS Properties Reference    样式表属性   字体 Font font(See 2.1.1) color(See 2.1.2) font-family(See 2.1.3) font-size(See 2.1.4) font-size-adjust(See 2.1.5) font-stretch(See 2.1.6) font-style(See 2.1.7) font-weight(See 2.1.8) text-decoration(See 2.1.9) text-underline-position(See 2.1.10) text-shadow(See 2.1.11) font-variant(See 2.1.12) text-transform(See 2.1.13) line-height(See 2.1.14) letter-spacing(See 2.1.15) word-spacing(See 2.1.16) 文本 Text text-indent(See 2.2.1) text-overflow(See 2.2.2) vertical-align(See 2.2.3) text-align(See 2.2.4) layout-flow(See 2.2.5) writing-mode(See 2.2.6) direction(See 2.2.7) unicode-bidi(See 2.2.8) word-break(See 2.2.9) line-break(See 2.2.10) white-space(See 2.2.11) word-wrap(See 2.2.12) text-autospace(See 2.2.13) text-kashida-space(See 2.2.14) text-justify(See 2.2.15) ruby-align(See 2.2.16) ruby-position(See 2.2.18) ruby-overhang(See 2.2.17) ime-mode(See 2.2.19) layout-grid(See 2.2.20) layout-grid-char(See 2.2.21) layout-grid-char-spacing(See 2.2.22) layout-grid-line(See 2.2.23) layout-grid-mode(See 2.2.24) layout-grid-type(See 2.2.25) 背景 Background background(See 2.3.1) background-attachment(See 2.3.2) background-color(See 2.3.3) background-image(See 2.3.4) background-position(See 2.3.5) background-positionX(See 2.3.6) background-positionY(See 2.3.7) background-repeat(See 2.3.8) layer-background-color(See 2.3.9) layer-background-image(See 2.3.10) 定位 Positioning position(See 2.4.1) z-index(See 2.4.2) top(See 2.4.3) right(See 2.4.4) bottom(See 2.4.5) left(See 2.4.6) 尺寸 Dimensions height(See 2.5.1) max-height(See 2.5.2) min-height(See 2.5.3) width(See 2.5.4) max-width(See 2.5.5) min-width(See 2.5.6) 布局 Layout clear(See 2.6.1) float(See 2.6.2) clip(See 2.6.3) overflow(See 2.6.4) overflow-x(See 2.6.5) overflow-y(See 2.6.6) display(See 2.6.7) visibility(See 2.6.8) 外补丁 Margins margin(See 2.7.1) margin-top(See 2.7.2) margin-right(See 2.7.3) margin-bottom(See 2.7.4) margin-left(See 2.7.5) 轮廓 Outlines outline(See 2.8.1) outline-color(See 2.8.2) outline-style(See 2.8.3) outline-width(See 2.8.4) 边框 Borders border(See 2.9.1) border-color(See 2.9.2) border-style(See 2.9.3) border-width(See 2.9.4) border-top(See 2.9.5) border-top-color(See 2.9.6) border-top-style(See 2.9.7) border-top-width(See 2.9.8) border-right(See 2.9.9) border-right-color(See 2.9.10) border-right-style(See 2.9.11) border-right-width(See 2.9.12) border-bottom(See 2.9.13) border-bottom-color(See 2.9.14) border-bottom-style(See 2.9.15) border-bottom-width(See 2.9.16) border-left(See 2.9.17) border-left-color(See 2.9.18) border-left-style(See 2.9.19) border-left-width(See 2.9.20) 内容 Generated Content include-source(See 2.10.1) quotes(See 2.10.2) content(See 2.10.3) counter-increment(See 2.10.4) counter-reset(See 2.10.5) 内补丁 Paddings padding(See 2.11.1) padding-top(See 2.11.2) padding-right(See 2.11.3) padding-bottom(See 2.11.4) padding-left(See 2.11.5) 列表项目 Lists list-style(See 2.12.1) list-style-image(See 2.12.2) list-style-position(See 2.12.3) list-style-type(See 2.12.4) marker-offset(See 2.12.5) 表格 Table border-collapse(See 2.13.1) border-spacing(See 2.13.2) caption-side(See 2.13.3) empty-cells(See 2.13.4) table-layout(See 2.13.5) speak-header(See 2.13.6) 滚动条 Scrollbars scrollbar-3d-light-color(See 2.14.1) scrollbar-highlight-color(See 2.14.2) scrollbar-face-color(See 2.14.3) scrollbar-arrow-color(See 2.14.4) scrollbar-shadow-color(See 2.14.5) scrollbar-dark-shadow-color(See 2.14.6) scrollbar-base-color(See 2.14.7) 打印 Printing page(See 2.15.1) page-break-after(See 2.15.2) page-break-before(See 2.15.3) page-break-inside(See 2.15.4) marks(See 2.15.5) orphans(See 2.15.6) size(See 2.15.7) widows(See 2.15.8) 声音 Aural voice-family(See 2.16.1) volume(See 2.16.2) elevation(See 2.16.3) azimuth(See 2.16.4) stress(See 2.16.5) richness(See 2.16.6) speech-rate(See 2.16.7) cue(See 2.16.8) cue-after(See 2.16.9) cue-before(See 2.16.10) pause(See 2.16.11) pause-after(See 2.16.12) pause-before(See 2.16.13) pitch(See 2.16.14) pitch-range(See 2.16.15) play-during(See 2.16.16) speak(See 2.16.17) speak-numeral(See 2.16.18) speak-punctuation(See 2.16.19) 其它属性 Classification behavior(See 2.17.2) zoom(See 2.17.4) cursor(See 2.17.1) filter(See 2.17.3)       说明:这种颜色是CSS2标准属性。这种颜色是IE建议样式表属性。这种颜色是NS私有属性。这种颜色是目前尚无浏览器支持的属性。 2.1 字体 Font CSS Font Properties    字体属性   Font Properties 属性 CSS Version 版本 Compatibility 兼容性 Inherit From Parent 继承性 Description 简介 font(See 2.1.1) CSS1/CSS2 IE4+ , NS4+ 有 复合属性。设置或检索对象中的文本特性 color(See 2.1.2) CSS1 IE4+ , NS4+ 有 检索或设置对象的文本颜色 font-family(See 2.1.3) CSS1 IE4+ , NS4+ 有 设置或检索用于对象中文本的字体名称序列 font-size(See 2.1.4) CSS1 IE4+ , NS4+ 有 设置或检索对象中的字体尺寸 font-size-adjust(See 2.1.5) CSS2 NONE 有 设置或检索用于对象中文本的字体名称序列是否强制使用同一尺寸 font-stretch(See 2.1.6) CSS2 NONE 有 设置或检索用于对象中文本的文字是否横向的拉伸变形 font-style(See 2.1.7) CSS1 IE4+ , NS4+ 有 设置或检索对象中的字体样式 font-weight(See 2.1.8) CSS1 IE4+ , NS4+ 有 设置或检索对象中的文本字体的粗细 text-decoration(See 2.1.9) CSS1 IE4+ , NS4+ 无 检索或设置对象中的文本的装饰,如下划线 、闪烁等 text-underline-position(See 2.1.10) IE专有属性 IE5.5+ 有 设置或检索text-decoration(See 2.1.9)属性定义的下划线的位置
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服