2024年2月8日发(作者:)
CSS参考手册
背景属性
background
描述
简写属性,作用是将背景属性设置在一个声明中。
背景图像是否固定或者随着页面的其余部分滚动。
设置元素的背景颜色。
把图像设置为背景。
设置背景图像的起始位置。
background-attachment
background-color
值
background-color
background-image
background-repeat
background-attachment
background-position
scroll
fixed
color-rgb
color-hex
color-name
transparent
url
none
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x-% y-%
x-pos y-pos
repeat
repeat-x
repeat-y
no-repeat
IE F N W3C
4
1 6 1
4 1 6 1
4 1 4 1
background-image
background-position
4 1 4 1
4 1 6 1
background-repeat 设置背景图像是否及如何重复。
4 1 4 1
border
边框属性
border-bottom
border-bottom-color
border-bottom-style
border-bottom-width
border-color
border-left
border-left-color
border-left-style
border-left-width
border-right
border-right-color
描述 值
简写属性。作用是在一
border-width
个声明中用来设置四
border-style
个边框的所有属性。
border-color
简写属性。作用是在一
border-bottom-width
个声明中用来设置下
border-style
边框的所有属性。
border-color
设置下边框的颜色。 border-color
设置下边框的样式。 border-style
设置下边框的宽度。
thin
medium
thick
length
设置四个边框的颜色,color
可以设置一到四个颜色。
简写属性。用于在一个
border-left-width
声明中设置左边框的
border-style
所有属性。
border-color
设置左边框的颜色。 border-color
设置左边框的样式。 border-style
设置左边框的宽度。
thin
medium
thick
length
简写属性。将所有用于
border-right-width
右边框的属性设置于
border-style
一个声明中。
border-color
设置右边框的颜色 border-color
IE F N W3C
4 1 4 1
4 1 6 1
4 1 6 2
4 1 6 2
4 1 4 1
4 1 6 1
4 1 6 1
4 1 6 2
4 1 6 2
4 1 4 1
4 1 6 1
4 1 6 2
border-right-style
border-right-width
设置右边框的样式
设置右边框的宽度。
border-style 设置四个边框的样式,可以设置一到四个样式。
border-top
border-top-color
border-top-style
border-top-width
简写属性。将所有用于上边框的属性设置于一个声明中。
设置上边框的颜色。
设置上边框的样式。
设置上边框的宽度。
border-width
简写属性。在一个声明中设置四个边框的宽度,可以设置一到四个值。
描述
设置文本颜色。
设置文本方向。
设置字符间距。
对齐元素中的文本。
border-style
thin
medium
thick
length
none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset
border-top-width
border-style
border-color
border-color
border-style
thin
medium
thick
length
thin
medium
thick
length
值
color
4 1 6 2
4 1 4 1
4 1 6 1
4 1 6 1
4 1 6 2
4 1 6 2
4 1 4 1
4 1 4 1
文本属性
color
direction
letter-spacing
text-align
text-decoration 向文本添加修饰。
text-indent
text-shadow
text-transform
缩进元素中文本的首行。
控制元素中的字母。
unicode-bidi
white-space
word-spacing
设置文本方向。
设设置元素中空白的处理方式。
设置字间距。
ltr
rtl
normal
length
left
right
center
justify
none
underline
overline
line-through
blink
length
%
none
color
length
none
capitalize
uppercase
lowercase
normal
embed
bidi-override
normal
pre
nowrap
normal
length
IE F N W3C
3 1 4 1
6 1 6 2
4
4
1 6 1
1 4 1
4 1 4 1
4
4
1 4 1
1 4 1
5
5
6
2
1 4 1
1 6 1
字体属性
font
描述
简写属性。作用是将所有针对字体的属性设置在一个声明中。
font-family
font-size
字体类型名称或者针对某元素的类属族名名称的优先列表。
设置字体的尺寸。
值
font-style
font-variant
font-weight
font-size/line-height
font-family
caption
icon
menu
message-box
small-caption
status-bar
family-name
generic-family
IE F N W3C
4 1 4 1
3 1 4 1
3 1 4 1
font-size-adjust
font-stretch
为元素规定 aspect
值。
收缩或拉伸当前的字体族。
xx-small
x-small
small
medium
large
x-large
xx-large
smaller
larger
length
%
none number
- - - 2
- - - 2
font-style
font-variant
font-weight
设置字体样式。
以小型小写字体或者正常字体显示文本
设置字体的粗细。
normal
wider
narrower
ultra-condensed
extra-condensed
condensed
semi-condensed
semi-expanded
expanded
extra-expanded
ultra-expanded
normal
italic
oblique
normal
small-caps
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
值
margin-top
margin-right
margin-bottom
4 1 4 1
4 1 6 1
4 1 4 1
外边距属性
margin
描述
简写属性。在一个声明中设置外边距属性。
IE F N W3C
4 1 4 1
margin-bottom
margin-left
margin-right
margin-top
设置元素的下外边距。
设置元素的左外边距。
设置元素的右外边距。
设置元素的上外边距。
margin-left
auto
length
%
auto
length
%
auto
length
%
auto
length
%
值
padding-top
padding-right
padding-bottom
padding-left
length
%
length
%
length
%
length
%
4
3
3
3
1 4 1
1 4 1
1 4 1
1 4 1
内边距属性
padding
描述
简写属性。作用是在一个声明中设置元素的内边距属性。
设置元素的下内边距。
设置元素的左内边距。
设置元素的右内边距。
设置元素的上内边距。
描述
简写属性。用于将所有用于列表的属性设置于一个声明之中。
将图象设置为列表项标记。
设置列表中列表项标记被放置的位置。
设置列表项标记的类型。
padding-bottom
padding-left
padding-right
padding-top
IE F N W3C
4 1 4 1
4
4
4
4
1 4 1
1 4 1
1 4 1
1 4 1
IE F N W3C
4 1 6 1
4 1 6 1
4 1 6 1
4 1 4 1
列表属性
list-style
list-style-image
list-style-position
list-style-type
marker-offset
描述
生成文档中的内容。
值
list-style-type
list-style-position
list-style-image
none
url
inside
outside
none
disc
circle
square
decimal
decimal-leading-zero
lower-roman
upper-roman
lower-alpha
upper-alpha
lower-greek
lower-latin
upper-latin
hebrew
armenian
georgian
cjk-ideographic
hiragana
katakana
hiragana-iroha
katakana-iroha
auto
length
值
1 7 2
内容属性
content
string
IE F N W3C
1 6 2
与 :before 以及 :after 伪元素配合使用。
url
counter(name)
counter(name,
list-style-type)
counters(name,
string)
counters(name,
string,
list-style-type)
attr(X)
open-quote
close-quote
no-open-quote
no-close-quote
none
none
none
counter-increment
counter-reset
quotes
设置某个选取器每次出现的计数器增量。
设置某个选择器出现次数的计数器的值。
设置引号的类型。
描述
简写属性。用来在一个声明中设置所有的
outline 属性。
设置围绕元素的轮廓的颜色。
设置围绕元素的轮廓的样式。
identifier number
identifier number
string string
outline-color
outline-style
outline-width
color
invert
none
dotted
dashed
solid
double
groove
ridge
inset
outset
thin
medium
thick
length
-
2
2
1 6 2
轮廓属性
outline
outline-color
outline-style
值 IE F N W3C
- 1.5 - 2
-
-
1.5 - 2
1.5 - 2
outline-width 设置围绕元素的轮廓的宽度。
- 1.5 - 2
height
尺寸属性 描述
设置元素高度。
设置行间距。 line-height
max-height
max-width
min-height
min-width
width
设置元素的最大高度。
设置元素的最大宽度。
设置元素的最小高度。
设置元素的最小宽度。
设置元素的宽度。
值
auto
length
%
normal
number
length
%
none
length
%
none
length
%
length
%
length
%
auto
%
length
IE F N W3C
4 1 6 1
4 1 4 1
-
-
-
-
4
1 6 2
1 6 2
1 6 2
1 6 2
1 4 1
clear
分类属性 描述
设置不允许存在浮动对象的边
规定光标类型(形状)
值
cursor
display 设置如何及是否显示某元素
float
position
设置图像或文本出现于另一元素中的何处
元素的定位方式:静态、相对定位、绝对定位、固定定位
设置元素可见或不可见 visibility
bottom
clip
left
left
right
both
none
url
auto
crosshair
default
pointer
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help
none
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
left
right
none
static
relative
absolute
fixed
visible
hidden
collapse
IE F N W3C
4 1 4 1
4 1 6 2
4 1 4 1
4 1 4 1
4 1 4 2
4 1 6 2
定位属性 描述
设置定位元素下外边距边界与其包含块下边界之间的偏移。
设置元素的形状。
设置定位元素左外边距边界与其包含块左边界之间的偏移。
设置当元素的内容溢出其区域时发生的事情。
overflow
值
auto
%
length
shape
auto
auto
%
length
visible
hidden
IE F N W3C
5 1 6 2
4
4
4
1 6 2
1 4 2
1 6 2
position 把元素放置到一个静态的、相对的、绝对的、或固定的位置中。
设置定位元素右外边距边界与其包含块右边界之间的偏移。
设置定位元素的上外边距边界与其包含块上边界之间的偏移。
设置元素的垂直排列。
right
top
vertical-align
z-index 设置元素的堆叠顺序。
scroll
auto
static
relative
absolute
fixed
auto
%
length
auto
%
length
baseline
sub
super
top
text-top
middle
bottom
text-bottom
length
%
auto
number
4 1 4 2
5
4
4
1 6 2
1 4 2
1 4 1
4 1 6 2
表格属性
border-collapse
border-spacing
caption-side
empty-cells
table-layout
描述
设置是否把表格边框合并为单一的边框。
设置分隔单元格边框的距离。(仅用于 "separated borders" 模型)
设置表格标题的位置。
设置是否显示表格中的空单元格。(仅用于 "separated borders" 模型)
设置显示单元、行和列的算法。
作用
将样式添加到被激活的元素。
将样式添加到被选中的元素。
当鼠标悬浮在元素上方时,向元素添加样式。
将特殊的样式添加到未被访问过的链接。
将特殊的样式添加到被访问过的链接。
将特殊的样式添加到元素的第一个子元素。
允许创作者来定义指定的元素中使用的语言。
作用
向文本的第一个字母添加特殊样式。
向文本的首行添加特殊样式。
在元素内容之前插入内容。
在元素内容之后插入内容。
IE
4
-
4
3
3
F
1
-
1
1
1
1
1
N
8
-
7
4
4
7
8
W3C
1
2
1
1
1
2
2
F
1
1
1.5
1.5
N
8
8
8
8
W3C
1
1
2
2
伪类
:active
:focus
:hover
:link
:visited
:first-child
:lang
伪元素
:first-letter
:first-line
:before
:after
IE
5
5
本文发布于:2024-02-08 08:53:29,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170735360967097.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |