1.字体样式(可以被继承)
1.1font-family: “微软雅黑”,“microsoft YaHei”,“宋体”,serif;
font-style: normal; itaily
font-weight: normal; bold bolder 100~900
font-size: 12px; 16px
line-height: 2em;
速写: font:style weight size /line-height family;
eg: font:normal normal 12px/2em “微软雅黑”,“microsoft YaHei”,“宋体”,serif;
1.2网络字体
主要用于字体图标库(iconfont/fontawesome)
使用步骤:
1) 在iconfont网站中选择图标,加入项目,产生代码
2) 将产生的代码在html中通过link引用 http://at.alicdn.com/t/font_1328534_f3dyyeuoew.css
3) 应用css中定义好的类,来使用对应的图标
2.文本样式(可以被继承)
text-align:center;
color:;
text-decoration:none;
text-decoration-line:overline line-through underline none;
text-decoration-style:solid double双线 dotted原点虚线 dashed破折号虚线 wavy波浪线
text-decoration-color:;
text-indent:2em;
text-shadow:0 0 5px #333;
3.列表样式
list-style-type circle square
list-style-image url(’’)
list-style-position outside inside
list-style:none;
4.box样式:
width
height
margin
margin-top
margin-right
margin-bottom
margin-left
margin:10px; 上右下左
margin:0 10px; 上下为0,左右10px
margin:0 5px 10px; 上0,左右5px,下10px
margin:0 5px 10px 15px; 上右下左
border:1px solid #ededed; 【*】
border-top-style 边框线类型
border-top-width 边框宽度
border-top-color 边框线颜色
border-top
border-right-style 边框线类型
border-right-width 边框宽度
border-right-color 边框线颜色
border-right
border-bottom-style 边框线类型
border-bottom-width 边框宽度
border-bottom-color 边框线颜色
border-bottom
border-left-style 边框线类型
border-left-width 边框宽度
border-left-color 边框线颜色
border-left
border-color
border-style
border-width
padding
padding-top
padding-right
padding-bottom
padding-left
box-shadow: 5px 5px 10px #ccc;
box-shadow:inset 0 0 3px lightblue;
border-radius 圆角半径
background
background-origin 背景铺设的起点
border-box 边框下
padding-box 内边距下
content-box 内容下
background-image 背景图片
url
background-repeat 背景重复方式
repeat-x
repeat-y
no-repeat
background-color 背景颜色
颜色
background-position 背景位置
center
top left
10px 20px
background-clip 背景裁切方式
border-box 边框下
padding-box 内边距下
content-box 内容下
background 速写
background:url(’’) no-repeat center;
background-size:cover;
=>
background:center/cover padding-box url(’’) no-repeat ;