css常用的基本属性文档格式.docx
- 文档编号:16661051
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:34
- 大小:38.17KB
css常用的基本属性文档格式.docx
《css常用的基本属性文档格式.docx》由会员分享,可在线阅读,更多相关《css常用的基本属性文档格式.docx(34页珍藏版)》请在冰豆网上搜索。
「宽」(width,确定盒子本身的宽度,可以使盒子的宽度不依靠它所包含的内容多少。
「高」(height,确定盒子本身的高度。
「浮动」(float,设置块元素的浮动效果。
「清除」(clear,用于清除设置的浮动效果。
「边距」(margin,控制围绕边框的边距大小。
其中包含4个属性:
margin-top控制上边距的宽度、margin-right控制右边距的宽度、margin-bottom控制下边距的宽度、margin-left控制左边距的宽度。
「边界」(padding,确定围绕块元素的空格填充数量,其中包含4个属性「padding-top控制上留白的宽度、padding-right控制右留白的宽度、padding-bottom控制下留白宽度、padding-left控制左留白的宽度。
[列表]属性共有3项:
「类型」(list-style-type,确定列表每一项前使用的符号,共有圆点(disc、圆圈(circle、方形(square、数字(decimal、小写罗马数字(lower-roman、大写罗马数字(upper-roman、小写字母(lower-alpha和大写字母(upper-alpha等8种。
「项目图像」(list-style-image,其作用是将列表前面的符号换为图形。
「位置」(list-style-position,用于描述列表位置,有内(outside和外(inside两种选择。
[定位]属性共有6项:
「类型」(position,用于确定定位的类型,共有绝对(absolute、相对(relative和静态(static等3种选择。
「Z轴」(z-index,用于控制网页中块元素的叠放顺序,可为元素设置重叠效果。
该属性的参数值使用纯整数,值为0时,元素在最下层,适用于绝对定位或相对定位的元素。
「显示」(visibility使用该属性可将网页中的元素隐藏,共有继承(inherit,继承母体要素的可视性设置、可见(visible和隐藏(hidden等3种选择。
「溢出」(overflow,在确定了元素的高度和宽度后,如果元素的面积不能全部显示元素中的内容时,该属性做一日和尚撞一天钟起作用了。
其中共有可见(visible,扩大面积以显示所有内容、隐藏(hidden,隐藏超出范围的内容、滚动(scroll,在元素的右边显示一个滚动条和自动(auto,当内容超出元素面积时,显示滚动条等4种选择。
「定位」,当为元素确定了绝对定位类型后,该组属性决定元素在网页中的具体位置。
该组属性包含4个子属性,分别是「左」(属性名为「left」,控制元素左边的起始位置、「上」(属性名为「top」,控制元素上面的起始位置、「宽」或「高」(与「盒子」类属性面板中「宽」或「高」的属性作用相同。
「剪辑」(clip,当元素被指定为绝对定位类型后,该属性可以把元素区域切成各种形状,但目前提供的只有方形一种。
属性值为rect(toprightbottomleft,即:
rect(toprightbottomleft,属性值的单位为任何一种长度单位。
[扩展]属性共有两部分:
「分页」,其中两个属性的作用是为打印的页面设置分页符。
「之前」(page-break-before;
「之后」(page-break-after。
「视觉效果」,其中两个属性的作用是为网页中的元素施加特殊效果。
「光标」(cusor,可以指定在某个元素上要使用的光标形状,共有15种选择方式,分别代表鼠标在Windows操作系统中的各种形状。
另外它还可以指定指针图标的URL地址;
「滤镜」(fiter,可以为网页中元素施加各种奇妙的滤镜效果,共包含有16种滤镜。
字体属性:
(font
大小font-size:
x-large;
(特大xx-small;
(极小一般中文用不到,只要用数值就可以,单位:
PX、PD
样式font-style:
oblique;
(偏斜体italic;
(斜体normal;
(正常
行高line-height:
normal;
(正常单位:
PX、PD、EM
粗细font-weight:
bold;
(粗体lighter;
(细体normal;
变体font-variant:
small-caps;
(小型大写字母normal;
大小写text-transform:
capitalize;
(首字母大写uppercase;
(大写lowercase;
(小写none;
(无
修饰text-decoration:
underline;
(下划线overline;
(上划线line-through;
(删除线blink;
(闪烁
常用字体:
(font-family
"
CourierNew"
Courier,monospace,"
TimesNewRoman"
Times,serif,Arial,Helvetica,sans-serif,Verdana
字体投影效果:
filter:
dropshadow(color=#FFFFFF,offx=1,offy=1,positive=1;
背景属性:
(background
色彩background-color:
#FFFFFF;
图片background-image:
url(;
重复background-repeat:
no-repeat;
滚动background-attachment:
fixed;
(固定scroll;
(滚动
位置background-position:
left(水平top(垂直;
简写方法background:
#000url(..repeatfixedlefttop;
区块属性:
(Block
字间距letter-spacing:
数值
对刘text-align:
justify;
(两端对齐left;
(左对齐right;
(右对齐center;
(居中
缩进text-indent:
数值px;
垂直对齐vertical-align:
baseline;
(基线sub;
(下标super;
(下标top;
text-top;
middle;
bottom;
text-bottom;
词间距word-spacing:
空格white-space:
pre;
(保留nowrap;
(不换行
显示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;
table-column;
table-cell;
table-caption;
(表格标题
方框属性:
(Box
width:
;
height:
float:
clear:
both;
margin:
padding:
顺序:
上右下左
边框属性:
(Border
border-style:
dotted;
(点线dashed;
(虚线solid;
double;
(双线groove;
(槽线ridge;
(脊状inset;
(凹陷outset;
border-width:
边框宽度
border-color:
#;
简写方法border:
widthstylecolor;
列表属性:
(List-style
类型list-style-type:
disc;
(圆点circle;
(圆圈square;
(方块decimal;
(数字
lower-roman;
(小罗码数字upper-roman;
lower-alpha;
upper-alpha;
位置list-style-position:
outside;
(外inside;
图像list-style-image:
url(..;
定位属性:
(Position
Position:
absolute;
relative;
static;
visibility:
inherit;
visible;
hidden;
overflow:
scroll;
auto;
clip:
rect(12px,auto,12px,auto(裁切
css属性代码大全
一CSS文字属性:
color:
#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;
/*下标字*/
super;
/*上标字*/
text-decoration:
line-through;
/*加删除线*/
overline;
/*加顶线*/
underline;
/*加下划线*/
none;
/*删除链接下划线*/
text-transform:
/*首字大写*/
uppercase;
/*英文大写*/
lowercase;
/*英文小写*/
text-align:
right;
/*文字右对齐*/
left;
/*文字左对齐*/
center;
/*文字居中对齐*/
justify;
/*文字分散对齐*/
vertical-align属性
top;
/*垂直向上对齐*/
bottom;
/*垂直向下对齐*/
middle;
/*垂直居中对齐*/
text-top;
/*文字垂直向上对齐*/vertical-align:
text-bottom;
/*文字垂直向下对齐*/layout-flow:
vertical-ideographic/*文字竖着排列*/二、CSS边框空白
padding-top:
10px;
/*上边框留空白*/
padding-right:
/*右边框留空白*/
padding-bottom:
/*下边框留空白*/padding-left:
/*左边框留空白
三、CSS符号属性:
list-style-type:
/*不编号*/
decimal;
/*阿拉伯数字*/
/*小写罗马数字*/
upper-roman;
/*大写罗马数字*/
lower-alpha;
/*小写英文字母*/
upper-alpha;
/*大写英文字母*/
disc;
/*实心圆形符号*/
circle;
/*空心圆形符号*/
square;
/*实心方形符号*/
list-style-image:
url(/dot.gif;
/*图片式符号*/
list-style-position:
outside;
/*凸排*/
inside;
/*缩进*/
四、CSS背景样式:
background-color:
#F5E2EC;
/*背景颜色*/
background:
transparent;
/*透视背景*/
background-image:
url(/image/bg.gif;
/*背景图片*/background-attachment:
/*浮水印固定背景*/background-repeat:
repeat;
/*重复排列-网页默认*/background-repeat:
/*不重复排列*/
background-repeat:
repeat-x;
/*在x轴重复排列*/background-repeat:
repeat-y;
/*在y轴重复排列*/
指定背景位置
background-position:
90%90%;
/*背景图片x与y轴的位置*/background-position:
top;
/*向上对齐*/
buttom;
/*向下对齐*/
left;
/*向左对齐*/
right;
/*向右对齐*/
center;
/*居中对齐*/
五、CSS连接属性:
a/*所有超链接*/
a:
link/*超链接文字格式*/
visited/*浏览过的链接文字格式*/
active/*按下链接的格式*/
hover/*鼠标转到链接*/
鼠标光标样式:
链接手指CURSOR:
hand
十字体cursor:
crosshair
箭头朝下cursor:
s-resize
十字箭头cursor:
move
箭头朝右cursor:
加一问号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
光标图案(IE6p{cursor:
url("
光标文件名.cur"
text;
}
六、CSS框线一览表:
border-top:
1pxsolid#6699cc;
/*上框线*/
border-bottom:
/*下框线*/
border-left:
/*左框线*/
border-right:
/*右框线*/
以上是建议书写方式,但也可以使用常规的方式如下:
border-top-color:
#369/*设置上框线top颜色*/
border-top-width:
1px/*设置上框线top宽度*/
border-top-style:
solid/*设置上框线top样式*/
其他框线样式
solid/*实线框*/
dotted/*虚线框*/
double/*双线框*/
groove/*立体内凸框*/
ridge/*立体浮雕框*/
inset/*凹框*/
outset/*凸框*/
七、CSS表单运用:
文字方块
按钮
复选框
选择钮
多行文字方块
下拉式菜单选项1选项2
八、CSS边界样式:
margin-top:
/*上边界*/
margin-right:
/*右边界值*/
margin-bottom:
/*下边界值*/
margin-left:
/*左边界值*/
CSS属性:
字体样式(FontStyle
序号中文说明标记语法
1字体样式{font:
font-stylefont-variantfont-weightfont-sizefont-family}
2字体类型{font-family:
字体1"
"
字体2"
字体3"
...}
3字体大小{font-size:
数值|inherit|medium|large|larger|x-large|xx-large|small|smaller|x-small|xx-small}
4字体风格{font-style:
inherit|italic|normal|oblique}
5字体粗细{font-weight:
100-900|bold|bolder|lighter|normal;
6字体颜色{color:
数值;
7阴影颜色{text-shadow:
16位色值}
8字体行高{line-height:
数值|inherit|normal;
9字间距{letter-spacing:
数值|inherit|normal}
10单词间距{word-spacing:
11字体变形{font-variant:
inherit|normal|small-cps}
12英文转换{text-transform:
inherit|none|capitalize|uppercase|lowercase}
13字体变形{font-size-adjust:
inherit|none}
14字体
{font-stretch:
condensed|expanded|extra-condensed|extra-expanded|inherit|narrower|normal|
semi-condensed|semi-expanded|ultra-condensed|ultra-expanded|wider}
文本样式(TextStyle
1行间距{line-height:
2文本修饰{text-decoration:
inherit|none|underline|overline|line-through|blink}
3段首空格{text-indent:
数值|inherit}
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- css 常用 基本 属性