CSS样式表标签

上传人:pu****.1 文档编号:431314044 上传时间:2023-11-22 格式:DOCX 页数:7 大小:17.42KB
返回 下载 相关 举报
CSS样式表标签_第1页
第1页 / 共7页
CSS样式表标签_第2页
第2页 / 共7页
CSS样式表标签_第3页
第3页 / 共7页
CSS样式表标签_第4页
第4页 / 共7页
CSS样式表标签_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《CSS样式表标签》由会员分享,可在线阅读,更多相关《CSS样式表标签(7页珍藏版)》请在金锄头文库上搜索。

1、CSS 样式表标签选择符大全一、类型选择符 以下是代码片段: body font-size:12px; P color:blue; 指对网页中已有的标签类型作为名称的选择符,如上表示: body 标签内的 所有文字大小为12px;段落内的文字颜色为蓝色。二、群组选择符 以下是代码片段: h4,p,span font-size:12px; 表示页面所有的h4,p,span标签内文字都为12px大小,即对一组对象进行 相同的样式指定,每个标签之间用逗号分隔开来。三、包含选择符 以下是代码片段: div p font-weight:bold; 表示div标签里边的p标签内的文字为粗体字、这是一种包含

2、关系,每个标 签之间用空格隔开,可以为多级包含。四、id和class选择符id 是对页面中的唯一元素进行样式定义,这个样式在页面中只使用一次、 即id不重复以下是代码片段:#myDivfont-size:12px;class 定义的是通用或经常使用的样式,一种样式在一个页面中需要出现多 次,即可以为不同的标签指定相同的class,如下表示:div和p标签内的字体 都是蓝色以下是代码片段:.redcolor:blue;五、组合选择符使用id或class,同时也使用标签来进行组合以下是代码片段: h1 #cont 表示 id 为 cont 的 h1 标签 以下是代码片段: h1 .cont 表示所

3、有 class 为 cont 的 h1 标签六、伪类选择符常见为 A 标签 以下是代码片段: a:link a:hover a:visited 七、通配选择符 以下是代码片段: * color:blue; 表示所有对象的字体都为蓝色。CSS 标签大全字体属性:(fon t)大小font-size: x-large;(特大)xx-small;(极小)一般中文用不到,只要用 数值就可以,单位: PX、PD样式 font-style: oblique;(偏斜体)italic;(斜体)normal;(正常) 行高 line-height: normal;(正常)单位:PX、PD、EM粗细 fon t-

4、weigh t: bold;(粗体)ligh ter;(细体)normal;(正常) 变体 fon t-varia nt: small-caps;(小型大写字母)normal;(正常) 大小写 text-transform: capitalize;(首字母大写)uppercase;(大写) lowercase;(小写)none;(无)修饰 text-decoration: underlined下划线)overline; (上划线) line-through;(删除线)blink;(闪烁)常用字体: (font-family)Courier New, Courier, monospace, Ti

5、mes New Roman, Times, serif, Arial, Helvetica, sans-serif, Verdana背景属性: (background) 色彩 background-color: #FFFFFF; 图片 background-image: url();重复 background-repeat: no-repeat;滚动 background-attachment: fixed;(固定)scroll;(滚动) 位置 background-position: left (水平)top(垂直); 简写方法 background:#000 url(.) repeat f

6、ixed left top;区块属性: (Block)字间距 letter-spacing: normal; 数值对刘text-align: justify;(两端对齐)left;(左对齐)right;(右对齐)cen ter;(居中)缩进 text-indent:数值 px;垂直对齐 vertical-align: baseline;(基线)sub;(下标)super;(下标)top; text-top; middle; bottom; text-bottom;词间距 word-spacing: normal; 数值空格 whi te-space: pre;(保留)nowrap;(不换行)显

7、示 display:block;(块)inline;(内嵌)list-item;(列表项)run-in;(追加 部分) compact; (紧凑) marker; (标记) table; inline-table; table-raw-group; table-header-group; table-footer-group; table-raw; table-column-group; t able-column; t able-cell; t able-cap tion;(表格标题)方框属性:(Box)width:; height:; float:; clear:both; margin:

8、; padding:; 顺序:上右下左边框属性: (Border)border-style: dotted(点线);dashed(虚线);solid(实线);double(双线); groove(槽线);ridge;(脊状)inse t;(凹陷)outset;border-width:; 边框宽度border-color:#;简写方法 border: width style color;列表属性: (List-style)类型 list-style-type: disc;(圆点)circle;(圆圈)square;(方块) decimal;(数字)lower-roman;(小罗码数字)uppe

9、r-roman; lower-alpha; upper-alpha;位置 lis t-sty le-posi tion: out side;(夕卜)inside;图像 list-style-image: url(.);定位属性: (Position)Position: absolute; relative; static; visibility: inherit; visible; hidden;overflow: visible; hidden; scroll; auto;clip: rect(12px,auto,12px,auto) (裁切) css 属性代码大全一 CSS 文字属性:co

10、lor : #999999;font-family : 宋体,sans-serif;font-size : 9pt; font-style:itelic;font-variant:small-caps; letter-spacing : 1pt;line-height : 200%; font-weight:bold; vertical-align:sub; vertical-align:super; text-decoration:line-through; text-decoration: overline; text-decoration:underline; text-decorati

11、on:none; text-transform : capitalize; text-transform : uppercase; text-transform : lowercase; text-align:right; text-align:left; text-align:center; text-align:justify; vertical-align 属性 vertical-align:top; vertical-align:bottom; vertical-align:middle; vertical-align:text-top; vertical-align:text-bot

12、tom;二、css边框空白 padding-top:10px; padding-right:10px; padding-bottom:10px; padding-left:10px;三、css 符号属性: list-style-type:none; list-style-type:decimal; list-style-type:lower-roman; list-style-type:upper-roman; list-style-type:lower-alpha; list-style-type:upper-alpha; list-style-type:disc; list-style-t

13、ype:circle; list-style-type:square; list-style-image:url(/dot.gif); list-style-position: outside; list-style-position:inside;四、css 背景样式: background-color:#F5E2Ec; background:transparent; background-image : url(/image/bg.gif); background-attachment : fixed;background-repeat : repeat; background-repea

14、t : no-repeat; background-repeat : repeat-x; background-repeat : repeat-y; 指定背景位置 background-position : 90% 90%; background-position : top; background-position : buttom; background-position : left; background-position : right; background-position : center;五、CSS连接属性:a a:link a:visited a:active a:hove

15、r鼠标光标样式: 链接手指 CURSOR: hand 十字体 cursor:crosshair 箭头朝下 cursor:s-resize 十字箭头 cursor:move 箭头朝右 cursor:move 加一问号 cursor:help 箭头朝左 cursor:w-resize 箭头朝上 cursor:n-resize 箭头朝右上 cursor:ne-resize 箭头朝左上 cursor:nw-resize 文字 I 型 cursor:text 箭头斜右下 cursor:se-resize 箭头斜左下 cursor:sw-resize 漏斗 cursor:wait光标图案(IE6) p cursor:url(光标文件名.cur), tex t;六、CSS 框线一览表:border-top : 1px solid #6699cc; border-bottom : 1px solid #6699cc; border-left : 1px solid #6699cc; border-right : 1px solid #6699cc; 以上是建议书写方式, 但也可以使用常规的方式 如下: border-top-co

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 机械/制造/汽车 > 综合/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号