网站开发

选择器的优先级
*{color:#009}
#d1{color:#0FC}
.c1{color:#09F}
span{color:#C09} /* 注释*/
标签选择器大于*(表示所有)
class选择器大于标签选择器
id选择器大于class选择器
越精确的优先级越高
*{margin:0px auto;padding:0px }height
样式:
1.大小 width 高度 height 高度
2.背景 background-color 背景色
background-image 背景图片
background- repeat 背景图的平铺方

background-position 背景图片位置
background-attachment 设置背景图
片是否滚动
background-size 背景图的大小200px
x 200px
3.字体 font-family 字体样式
font-size 字体大小 12px 14px
font-style italic倾斜
font-weight bold 加粗
text-decoration1.underline 下划线
2.overline 上划线
3. line-through 删
除线
4.none没有
color 字体颜色

对齐方式
1.text-align 水平对齐方式
2.vertical-align 处置对齐方式 配
合行高使用
3.line-height 行高
4. text-indent缩进单位像素
边界边框
1.margin 外边距 上右下左 内边距
上右下左
2.padding 如果加了内边距 该元素
会相应地变大
3.border 1px solid#60f 间歇方式
第一个边框粗细
{ margin:0px auto;padding:opx}

 

border:10px solid #F00; 边框 粗细颜色
display :=

 


dislay 显示block和隐藏none 不占位置
visilility 显示visib和隐藏hidden占位置
overflow 超出范围 hidden隐藏
透明 opacity:0.5;-moz-opacity:0.5;
filter:alpha(opacity=50)
圆角 border-radius:5px
阴影 box-shadow:0 0 5px white;

posted @ 2016-10-31 16:21  梦梦梦梦想  阅读(94)  评论(0编辑  收藏  举报