CSS标签属性大全.doc

上传人:scccc 文档编号:13789032 上传时间:2022-01-23 格式:DOC 页数:10 大小:170.50KB
返回 下载 相关 举报
CSS标签属性大全.doc_第1页
第1页 / 共10页
CSS标签属性大全.doc_第2页
第2页 / 共10页
CSS标签属性大全.doc_第3页
第3页 / 共10页
CSS标签属性大全.doc_第4页
第4页 / 共10页
CSS标签属性大全.doc_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《CSS标签属性大全.doc》由会员分享,可在线阅读,更多相关《CSS标签属性大全.doc(10页珍藏版)》请在三一文库上搜索。

1、css样式大全(整理版)字体属性:(font)大小font-size: x-large;(特大)xx-small;( 极小)一般中文用不到,只要用数值就可以,单位:PX、PD样式fon t-style: oblique;(偏斜体)italic;(斜体)normal;( 正常)行高li ne-height: n ormal;(正常)单位:PX PD EM粗细fon t-weight: bold;(粗体)lighter;(细体)normal;(正常)变体fon t-varia nt: small-caps;(小型大写字母 )n ormal;(正常)大小 写text-tra nsform: capi

2、talize;(首字母大 写 )uppercase;(大写)lowercase;( 小写)none;( 无)修饰text-decoration: underline;(下划线)overline;(上划线)line-through;(删除线)blink;(闪烁)常用字体: (fon t-family)Courier New, Courier, mono space, TimesNew Roman. Times, serif, Arial, Helvetica, sans-serif, Ver dana背景属性:(backgrou nd)色彩background-color: #FFFFFF;图片

3、background-image: url();重复background-repeat: no-repeat;滚动 background-attachment: fixed;(固定)scroll;( 滚动)位置background-position: left;(水平)top( 垂直);简写方法background:#000 url(.) repeat fixed left top; /* 简写这个在阅读代码中经常出现,要认真的研究 */区块属性:(Block)/*这个属性第一次认识,要多多研究*/字间距letter-spacing: normal;数值/*这个属性似乎有用,多实践下*/对齐t

4、ext-align: justify;(两端对齐)left;( 左对齐)right;( 右对齐)center;(居中)缩进text-indent:数值 px;垂直对齐vertical-align:baseline;(基线)sub;(下标)super;(下标)top; text-top;middle; bottom; text-bottom;词间距 word-spacing: normal;数值空格 white-space: pre;( 保留)nowrap;( 不换行)显示display:block;( 块)inline;(内嵌)list-item;( 列表项)run-in;(追加部分)comp

5、act;( 紧凑)marker;( 标记)table; inline-table table-raw-group;table-header-group;table-footer-group;table-raw;table-column-group; table-column; table-cell;table-caption;(表格标题)/*display属性的了解很模糊*/ 方框属性: (Box) width:; height:; float:; clear:both; margin:; padding:;顺序:上右下左边框属性:(Border) border-style: dotted;(

6、点线)dashed;( 虚线)solid; double;(双线)groove;(槽线)ridge;( 脊状)inset;(凹陷)outset; border-width:;边框宽度 border-color:#;简写方法 border : width style color; /*简写 */列表属性:(List-style) square;( 方块)decimal;( 数字) upper-alpha;位置 list-style-position: outside;( 图像 list-style-image: url(.);定位属性:(Positio n) Positi on: visible

7、;hidde n;overflow:rect(12px,auto,12px,auto)( 裁切)类型 list-style-type:disc;( 圆点)circle;( 圆 圈)lower-roman;(小罗码数字)upper-roman; lower-alpha;夕卜)in side;absolute; relative; static; visibility:in herit;visible; hidde n; scroll; auto; clip:CSS属性代码大全一 CSS文字属性: color : #999999; /* fon t-family : fon t-size : 9p

8、t; /* fon t-style:itelic; /* fon t-varia nt:small-caps; /* letter-spac ing : 1pt; /* line-height : 200%; /* fon t-weight:bold; /* vertical-alig n:sub; /* vertical-align:super; /* text-decorati on :li ne-through; /* text-decorati on: overli ne; /* text-decoration:underline; /* text-decorati on:none;

9、/* text-transform : capitalize; /* text-tra nsform : uppercase; /* text-transform : lowercase; /* text-alig n:r ight; /* text-align:left; /* text-alig n:cen ter; /* text-align:justify; /* vertical-alig n属性vertical-align:top; /* vertical-alig n: bottom; /* vertical-alig n:middle; /* vertical-alig n:t

10、ext-top; /* vertical-align:text-bottom; /*二、CSS边框空白 paddi ng-top:10px; /* paddi ng-right:10px; /* paddi ng-bottom:10px; /* paddi ng-left:10px; /*三、CSS符号属性:文字颜色*/宋体,sans-serif; /*文字字体*/文字大小*/文字斜体*/小字体*/字间距离*/设置行高*/文字粗体*/下标字*/上标字*/加删除线*/加顶线*/加下划线*/删除链接下划线*/ 首字大写*/ 英文大写*/ 英文小写*/ */文字右对齐文字左对齐*/ 文字居中对齐*/

11、 文字分散对齐*/垂直向上对齐*/垂直向下对齐*/垂直居中对齐*/文字垂直向上对齐*/文字垂直向下对齐*/上边框留空白*/右边框留空白*/下边框留空白*/左边框留空白list-style-type:none; /* list-style-type:decimal; /* list-style-type:lower-roman; /* list-style-type:upper-roma n; /* list-style-type:lower-alpha; /* list-style-type:upper-alpha; /* list-style-type:disc; /* list-style

12、-type:circle; /* list-style-type:square; /* list-style-image:url(/dot.gif); /* list-style-positi on: outside; /* list-style-positi on:i nside; /* 四、CSS背景样式: backgrou nd-color:#F5E2EC; /* backgro un d:tra nspare nt; /*不编号*/阿拉伯数字*/小写罗马数字*/大写罗马数字*/ 小写英文字母*/ 大写英文字母*/ 实心圆形符号*/空心圆形符号*/实心方形符号*/图片式符号*/ 凸排*/

13、缩进*/背景颜色*/透视背景*/background-image : url(/image/bg.gif); /*背景图片 */background-attachment: fixed; /* backgro un d-repeat : repeat; /* backgro un d-repeat : no-repeat; /* backgro un d-repeat : repeat-x; /* backgro un d-repeat : repeat-y; /* 指定背景位置 backgro un d-positi on backgro un d-positi on backgro un

14、d-positi on backgro un d-positi on backgro un d-positi on backgro un d-positi on 五、CSS连接属性: a /*所有超链接*/ a:link /*超链接文字格式*/a:visited /*浏览过的链接文字格式a:active /*按下链接的格式*/a:hover /*鼠标转到链接*/鼠标光标样式:90% 90%; /* top; /* buttom; /* left; /* right; /* cen ter; /*浮水印固定背景*/重复排列-网页默认*/不重复排列*/在x轴重复排列*/在y轴重复排列*/背景图片x

15、与y轴的位置*/ 向上对齐*/向下对齐*/向左对齐*/向右对齐*/居中对齐*/*/链接手指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

16、漏斗 cursor:wait 光标图案(IE6) p cursor:url(六、CSS框线一览表:border-top : 1px solid #6699cc; /* border-bottom : 1px solid #6699cc; /* border-left : 1px solid #6699cc; /* border-right : 1px solid #6699cc; /*光标文件名.cur),text;以上是建议书写方式,但也可以使用常规的方式 border-top-color : #369 /* border-top-width :1px /* border-top-style

17、 : solid/* 其他框线样式上框线*/下框线*/ 左框线*/ 右框线*/ 如下:设置上框线top颜色*/ 设置上框线top宽度*/ 设置上框线top样式*/solid /* 实线框*/ dotted /* 虚线框 */ double /* 双线框 */ groove /*立体内凸框*/ ridge /*立体浮雕框*/in set /*凹框 */outset /* 凸框 */ 七、CSS表单运用: 文字方块按钮 复选框 选择钮 多行文字方块 下拉式菜单 选项1选项2 八、CSS边界样式:margin-top:10px; /*上边界 */margin-right:10px; /* 右边界值

18、*/margin-bottom:10px; /*下边界值 */margin-left:10px; /*左边界值 */CSS属性: 字体样式(Font Style)序号中文说明标记语法1 字体样式fon t:fo nt-style fon t-varia nt fon t-weight fon t-size fon t-family2字体类型font-family: 字体1,字体2,字体3,.3 字体大小font-size:数值 |inherit| medium| large| larger| x-large| xx-large| small| smaller| x-small| xx-smal

19、l4 字体风格fon t-style:i nherit|italic| normal|oblique5 字体粗细fon t-weight:100-900|bold|bolder|lighter| normal;6字体颜色color:数值;7阴影颜色8字体行高9字间距 单词间距 字体变形 英文转换 字体变形101112text-shadow:16li ne-height:letter-spac ing:word-spac ing:位色值fon t-varia nt:i nherit |no rmal|small-cps text-tra nsform:i nherit| non e|capita

20、lize|uppercase|lowercasefon t-size-adjust: in herit |none数值 |inherit|normal; 数值 |in herit| no rmal 数值 |inherit|normal1314字体fon t-stretch:c onden sed|expa nded|extra-c onden sed|extra-expa nded| in herit |n arrower| no rmal|semi-c onden sed|semi-expa nded|ultra-c onden sed|ultra-expa nded|wider 文本样式(

21、Text Style)中文说明标记语法行间距line-height:文本修饰段首空格水平对齐垂直对齐数值 |inherit|normal;text-decorati on:i nherit| non e|u nderli ne|overli ne|li ne-through|bli nk text-indent:数值 |inherittext-alig n:left|right|ce nterjustify序号125vertical-alig n:i nherit|top|bottom|text-top|text-bottom|baseli ne|middle|sub|sup er6 书写方式

22、writi ng-mode:lr-tb|tb-rl背景样式序旦1233backgro un d-color:数值backgro un d-image: url(URL)| nonebackgro un d-repeat:i nherit |no-repeat|repeat|repeat-x|repeat-ybackgro un d-attachme nt:fixed|scrollbackground-position:数值 |top|bottom|left|right|centerbackground:背景颜色|背景图象|背景重复|背景附件|背景位置号中文说明标记语法背景颜色背景图片背景重复背

23、景固定背景定位背影样式框架样式(Box Style)序号中文说明标记语法1 边界留白margi n: margi n-top margin-right margi n-bottom margi n-left2 补 白 padding:padding-top padding-right padding-bottom padding-left3边框宽度border-bottom-widthborder-width:border-top-widthborder-right-widthborder-left-width宽度值:thi n|medium|thick|数值4边框颜色border-color

24、:数值 数值 数值 数值 数值:分别代表top、right bottomleft颜色值5边框风格border-style:non e|hidde n|i nherit|dashed|solid|double|i nset|outset|ridge|groove6 边 框 border:border-width border-style color上边框border-top:border-top-width border-style color右边框 border-right:border-right-width border-style color下边框 border-bottom:borde

25、r-bottom-width border-style color左边框 border-left:border-left-width border-style color7宽 度width: 长度|百分比| auto8 高度height:数值 |auto9 漂浮float:left|right |none10 清除clear: non e|left|right|both分类列表序号中文说明标记语法1 控制显示display:none|block|inline|list-item2 控制空白white-space:normal|pre|nowarp3符号列表list-style-type:disc|circle|square|decimal|lower-roma n| upper-roma n|lower-alpha|upper-alpha |none4 图形列表list-style-image:URL5 位置列表list-style-positi on:i nside|outside6目录列表 list-style:目录样式类型|目录样式位置|url7鼠标形状cursor:ha nd|crosshair|text|wait|move|help|e-resize| nw-resize|w-resize|s-resize|se-resize|sw-resize

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1