背景与前景温习

border-top    上边框

top-center     顶部居中

margin:0px  auto     居中

no-repeat    不平铺

repeat          平铺

repeat-x       横向平铺

repeat-y       纵向平铺

background-position:left   100px    top  200px;      离左边距100像素,离上边距200像素(可以设为负值)

background-image:   url(路径) ;         设置背景图片

background-attachment:   fixed;           背景是固定的,不随字体滚动

background-attachment:   acroll;           背景随字体滚动

字体:

font-family:"微软雅黑";          字体

font-size:12px;     字体大小,常用像素。也可用“em”。"2.5em"即:默认字体的2.5倍。还可以用百分数。

font-weight:boid;    bold 是加粗         normal   是正常

font-style:italic         是倾斜           normal    是不倾斜

color:   #03c;           颜色

text-decoration:    underline;         下划线       overline      是上划线     middle      line-through      是删除线       none      是去掉下划线

text-align:      conter;          (水平对齐)居中对齐,    left     左对齐         right      右对齐

vertical-align:    middle;       (垂直对齐)居中对齐,         top     顶部对齐           bottom      底部对齐。     一般设置行高后使用

text-indent:    28px;        首行缩进量

line-height:      24;           行高。一般为1.5~2倍字体大小

display:  noen;                 none    不显示         inline-block      显示为块,不自动换行,宽高可设,block      显示为块,自动换行        inline     效果同span标签,不自动换行,宽高不可设

visibility:      hidden;        可视性。        hiddden        隐藏但是占空间          visible      显示

原文地址:https://www.cnblogs.com/yunpeng521/p/6873355.html