字体的样式:
font-size: 16px;字体大小
font-family: 微软雅黑;选择字体种类
font-weight: bold; /bolder:加粗
font: lighter; 取消加粗
font-weight: lighter;100-500不加粗500-900逐渐加粗反而变细
font-weight:100 ;
font-style: italic;倾斜
font-style: oblique;倾斜
font:font-style font-weight font-size / line-height font-family 文字简写 顺序不能改变
必须 font-family font-size 必须同时制定才能生效
text-align: center; 水平居中
text-align: right;右对齐
text-align: left;左对齐
text-align: justify;水平两端对齐 只对多行文本起作用
line-height: 行高;
text-decoration: none;去除下划线
text-decoration: underline;下划线
text-decoration: overline;上划线
text-decoration: line-through; 删除线
letter-spacing:字间距;主要用于中文
word-spacing: 字间距 主要用于英文;
text-indent: 首行缩进;
}
列表属性设置:
list-style-image:url(图片的地址):设置列表是图片风格
list-style-type:none[去掉标签样式]、circle[空心圆]、disc[实心圆]、square[实心正方形】:设置列表样式
list-style-posiyion:inside[在列表中]、outside[在列表外面]:设置列表样式的位置
ist-style:、、、、缩写
背景属性设置:
background-color: 设置图片的颜色
background-image: url("图片的位置"); 背景图片
background-repeat :no-repeat 图片在页面不平铺
background-position: left center; 图片的定位
background-position:不能平铺
background-position-x: right;水平
background-position-y: top; 垂直
background-position: 4px 5px;默认先水平在垂直
background: url(img/pic.jpg) no-repeat pink center center ;缩写、顺序可以改变
background-attachment : scroll :滚动 fixed:固定 背景图的 滚动和固定
background-size: ;设置背景图片的大小