网页设计中的CSS样式代码详解.docx

上传人:b****0 文档编号:965146 上传时间:2022-10-14 格式:DOCX 页数:27 大小:19.82KB
下载 相关 举报
网页设计中的CSS样式代码详解.docx_第1页
第1页 / 共27页
网页设计中的CSS样式代码详解.docx_第2页
第2页 / 共27页
网页设计中的CSS样式代码详解.docx_第3页
第3页 / 共27页
网页设计中的CSS样式代码详解.docx_第4页
第4页 / 共27页
网页设计中的CSS样式代码详解.docx_第5页
第5页 / 共27页
点击查看更多>>
下载资源
资源描述

网页设计中的CSS样式代码详解.docx

《网页设计中的CSS样式代码详解.docx》由会员分享,可在线阅读,更多相关《网页设计中的CSS样式代码详解.docx(27页珍藏版)》请在冰豆网上搜索。

网页设计中的CSS样式代码详解.docx

网页设计中的CSS样式代码详解

CSS背景属性

属性

描述

IE

F

N

W3C

background

简写属性,作用是将背景属性设置在一个声明中。

∙background-color

∙background-image

∙background-repeat

∙background-attachment

∙background-position

4

1

6

1

background-attachment

背景图像是否固定或者随着页面的其余部分滚动。

∙scroll

∙fixed

4

1

6

1

background-color

设置元素的背景颜色。

∙color-rgb

∙color-hex

∙color-name

∙transparent

4

1

4

1

background-image

把图像设置为背景。

∙url

∙none

4

1

4

1

background-position

设置背景图像的起始位置。

∙topleft

∙topcenter

∙topright

∙centerleft

∙centercenter

∙centerright

∙bottomleft

∙bottomcenter

∙bottomright

x-%y-%

∙x-posy-pos

4

1

6

1

background-repeat

设置背景图像是否及如何重复。

∙repeat

∙repeat-x

∙repeat-y

∙no-repeat

4

1

4

1

CSS边框属性(border)

属性

描述

IE

F

N

W3C

border

简写属性。

作用是在一个声明中用来设置四个边框的所有属性。

∙border-width

∙border-style

∙border-color

4

1

4

1

border-bottom

简写属性。

作用是在一个声明中用来设置下边框的所有属性。

∙border-bottom-width

∙border-style

∙border-color

4

1

6

1

border-bottom-color

设置下边框的颜色。

border-color

4

1

6

2

border-bottom-style

设置下边框的样式。

border-style

4

1

6

2

border-bottom-width

设置下边框的宽度。

∙thin

∙medium

∙thick

∙length

4

1

4

1

border-color

设置四个边框的颜色,可以设置一到四个颜色。

color

4

1

6

1

border-left

简写属性。

用于在一个声明中设置左边框的所有属性。

∙border-left-width

∙border-style

∙border-color

4

1

6

1

border-left-color

设置左边框的颜色。

border-color

4

1

6

2

border-left-style

设置左边框的样式。

border-style

4

1

6

2

border-left-width

设置左边框的宽度。

∙thin

∙medium

∙thick

∙length

4

1

4

1

border-right

简写属性。

将所有用于右边框的属性设置于一个声明中。

∙border-right-width

∙border-style

∙border-color

4

1

6

1

border-right-color

设置右边框的颜色

border-color

4

1

6

2

border-right-style

设置右边框的样式

border-style

4

1

6

2

border-right-width

设置右边框的宽度。

∙thin

∙medium

∙thick

∙length

4

1

4

1

border-style

设置四个边框的样式,可以设置一到四个样式。

∙none

∙hidden

∙dotted

∙dashed

∙solid

∙double

∙groove

∙ridge

∙inset

∙outset

4

1

6

1

border-top

简写属性。

将所有用于上边框的属性设置于一个声明中。

∙border-top-width

∙border-style

∙border-color

4

1

6

1

border-top-color

设置上边框的颜色。

border-color

4

1

6

2

border-top-style

设置上边框的样式。

border-style

4

1

6

2

border-top-width

设置上边框的宽度。

∙thin

∙medium

∙thick

∙length

4

1

4

1

border-width

简写属性。

在一个声明中设置四个边框的宽度,可以设置一到四个值。

∙thin

∙medium

∙thick

∙length

4

1

4

1

CSS文本属性

属性

描述

IE

F

N

W3C

color

设置文本颜色。

color

3

1

4

1

direction

设置文本方向。

∙ltr

∙rtl

6

1

6

2

letter-spacing

设置字符间距。

∙normal

∙length

4

1

6

1

text-align

对齐元素中的文本。

∙left

∙right

∙center

∙justify

4

1

4

1

text-decoration

向文本添加修饰。

∙none

∙underline

∙overline

∙line-through

∙blink

4

1

4

1

text-indent

缩进元素中文本的首行。

∙length

∙%

4

1

4

1

text-shadow

 

∙none

∙color

∙length

 

 

 

 

text-transform

控制元素中的字母。

∙none

∙capitalize

∙uppercase

∙lowercase

4

1

4

1

unicode-bidi

设置文本方向。

∙normal

∙embed

∙bidi-override

5

 

 

2

white-space

设设置元素中空白的处理方式。

∙normal

∙pre

∙nowrap

5

1

4

1

word-spacing

设置字间距。

∙normal

∙length

6

1

6

1

CSS字体属性(font)

属性

描述

IE

F

N

W3C

font

简写属性。

作用是将所有针对字体的属性设置在一个声明中。

∙font-style

∙font-variant

∙font-weight

∙font-size/line-height

∙font-family

∙caption

∙icon

∙menu

∙message-box

∙small-caption

∙status-bar

4

1

4

1

font-family

字体类型名称或者针对某元素的类属族名名称的优先列表。

∙family-name

∙generic-family

3

1

4

1

font-size

设置字体的尺寸。

∙xx-small

∙x-small

∙small

∙medium

∙large

∙x-large

∙xx-large

∙smaller

∙larger

∙length

∙%

3

1

4

1

font-size-adjust

为元素规定aspect值。

nonenumber

-

-

-

2

font-stretch

收缩或拉伸当前的字体族。

∙normal

∙wider

∙narrower

∙ultra-condensed

∙extra-condensed

∙condensed

∙semi-condensed

∙semi-expanded

∙expanded

∙extra-expanded

∙ultra-expanded

-

-

-

2

font-style

设置字体样式。

∙normal

∙italic

∙oblique

4

1

4

1

font-variant

以小型小写字体或者正常字体显示文本

∙normal

∙small-caps

4

1

6

1

font-weight

设置字体的粗细。

∙normal

∙bold

∙bolder

∙lighter

∙100

∙200

∙300

∙400

∙500

∙600

∙700

∙800

∙900

4

1

4

1

CSS外边距属性(margin)

属性

描述

IE

F

N

W3C

margin

简写属性。

在一个声明中设置外边距属性。

∙margin-top

∙margin-right

∙margin-bottom

∙margin-left

4

1

4

1

margin-bottom

设置元素的下外边距。

∙auto

∙length

∙%

4

1

4

1

margin-left

设置元素的左外边距。

∙auto

∙length

∙%

3

1

4

1

margin-right

设置元素的右外边距。

∙auto

∙length

∙%

3

1

4

1

margin-top

设置元素的上外边距。

∙auto

∙length

∙%

3

1

4

1

CSS内边距属性(padding)

属性

描述

IE

F

N

W3C

padding

简写属性。

作用是在一个声明中设置元素的内边距属性。

∙padding-top

∙padding-right

∙padding-bottom

∙padding-left

4

1

4

1

padding-bottom

设置元素的下内边距。

∙length

∙%

4

1

4

1

padding-left

设置元

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

当前位置:首页 > IT计算机

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1