Html总结
设置字体大小12px:font-size:12px ;
设置字体类型“楷书”:font-family:"楷书";
设置字体风格:font-style:italic;
设置字体粗细:font-weight:bold;
在一个声明中设置所有子体属性:font:italic bold 38px"宋体";
font-weight属性的值:
normal 默认值,定义标准的字体
bold 粗体字体
bolder 刚粗的字体
lighter 更细的字体
color 设置文本的颜色
text-align 设置元素水平对齐的方式
text-indent 设置首行文本的缩进
line-height 设置文本的行高
text- decoration 设置文本的装饰
text -align属性的常用值
left 把文本排列到左边,默认值
reght 把文本列到右边
center 把文本排列到中间
justify 实现两端对齐文本效果
text- decoration 属性的常用值
none 默认值
underline 设置文本下划线
overline 设置文本上划线
line-through 设置文本的删除线
文本阴影语法:
text-shadow:color x轴位移(x-offset)y轴位移(y-offset) 模糊半径(blur-radius);
边框
边框(border)有三个属性,分别是color(颜色),width(粗细)和style(样式)。
broder-color;边框四边同为一个颜色
border-top-color;设置上边框的颜色
border-righy-color;设置右边边框的颜色
border-bottom-color;设置下边框的颜色
border-left-color;设置左边框的颜色
border-top-width:5px;设置上边框的粗细为5px
border-bottom-width:5px;设置下边框的粗细为5px
border-left-width:5px;设置左边框的粗细为5px
border-right-width:5px;设置右边框的粗细为5px
border-top-style:solid;设置上边框为实线
boreder-right-style:solid;设置右边框为实线
boreder-borrom-style:solid;设置下边框为实线
boreder-left-style:solud;设置左边框为实线
外边距 内边距
margin-top:1px;设置上外边距 padding-left:1px;设置上内边距
margin-right:1px;设置右外边距 padding-right:1px;设置右内边距
margin-bottom:1px;设置下外边距 padding-bottom:1px;设置下内边距
margin-left:1px;设置左外边距 padding-left:1px;设置左内边距
float浮动
left 元素向左浮动
right 元素向右浮动
none 默认值
clear 清除浮动
clear:left 清除元素向左浮动
clear:right 清除元素向右浮动
relative :相对定位 absolute :绝对定位 fixed :固定定位
浙公网安备 33010602011771号