css

选择器{属性:属性值;}
        伪类选则器:——a:hover必须置于a:link和a:visited之后,才有效。a:active置于a:hover之后才有效。
            属性    描述    CSS
            :active    向被激活的元素添加样式。    1
            :focus    向拥有键盘输入焦点的元素添加样式。    2
            :hover    当鼠标悬浮在元素上方时,向元素添加样式。    1
            :link    向未被访问的链接添加样式。    1
            :visited    向已被访问的链接添加样式。    1
            :first-child    向元素的第一个子元素添加样式。    2
            :lang    向带有指定 lang 属性的元素添加样式。
        标记选择器:HTML标记名作为选择器
        类选择器:HTML中设置class属性,类选择器由“.”及类名名称直接相连
        id选择器:只有页面上的标记(body标记及子标记)才能给定id。类选择器由“#”及类名名称直接相连
    css选择器声明:
        集体声明:“,”分隔多个选择器
        全局声明:“*”
    css定义与引用:
        内联样式:<标记 style="属性1:属性值;.......">
        内部样式表:<style type="text/html">css样式</style>
        外部样式表:外部样式表写在.css文件里<link href="---.css" rel="stylesheet" type="text/css">只存在与head部分
        导入外部样式表:<style type="text/css">@import url("---.css");</style>
    css继承与层叠:行内样式>id 样式>class样式>标记样式
    div图层:<div id="" class="" style="position:absolute;left:10px;top:10px;width:10px;height:10px;background:red">....</div>
    span标记:是行内标记,行内元素。
                <span id="样式名称" class="样式名称" >。。。。。</span >
                
                
css属性值得单位
    绝对单位:
    相对单位:em,ex,px,%,
css 文字样式
        font-size:绝对大小,相对大小
        font-style:normal/italic/oblique(默认,斜体,倾斜)
        font-variant:normal/small-caps(正常,小型的大写之母字体)
        font-weight:normal/bold/bolder/lighter/100~900(默认,粗体,特粗体,细体,)
        font-family:字体1,字体2。。。。。
        font属性:font-style font-weight font-variant font-size line-height 
css精细排版:
    字符间距:letter-spacing:nomal|长度单位
    首行缩进:text-index:长度单位|百分比单位
    字符装饰:text-decoration:none|underline|blink|overline|line-through
                blink;闪烁   underline  下划线 overline上划线 line-through 删除线 
    英文大小写转换:text-transform:capitalize(将每个单词的第一个字符转换成大写)|uppercase(大写)|lowercase(小写)|none(不转换)
    水平对齐::left|right|center|justify(两端对齐)
    垂直对齐:vertical-align:baseline | sub | super | top | text- top | middle | bottom | text-bottom | <百分比> | <长度> | inherit 
                (baseline:基线对齐;sub:下标;super:上标;top:顶端对齐;text-top:与文本的顶端对齐;
                middle:中部对齐;bottom:底端对齐; text-bottom:文本的底端对齐;)
    行距属性:line-height:normal|length
css背景颜色:color:rgb(r%,g%,b%)|rgb(r,g,b)|#FFFFFF|colorname
    背景属性:background
            子属性:背景颜色:background-color
                     背景图像:background-image:url|none 
                     图像浮动:float:left|center|right
                     背景图像重复:background-repeat:repeat    默认。背景图像将在垂直方向和水平方向重复。
                                     repeat-x    背景图像将在水平方向重复。
                                     repeat-y    背景图像将在垂直方向重复。
                                     no-repeat    背景图像将仅显示一次。
                                     inherit    规定应该从父元素继承 background-repeat 属性的设置。
                     背景附件:background-attachment:scall(文字在页面滚动时,背景附件一起滚动)|fixed(背景固定不动)
                     背景位置:background-position:百分比|长度|关键字
                                x% y%    第一个值是水平位置,第二个值是垂直位置
                                xpos ypos    第一个值是水平位置,第二个值是垂直位置。
                                left center right top button center
                     background的复合:background-color|background-image|background-repeat|background-attachment|background-position
css样式表:列表样式:list-style-type:属性
                            none    无标记。
                            disc    默认。标记是实心圆。
                            circle    标记是空心圆。
                            square    标记是实心方块。
                            decimal    标记是数字。
                            decimal-leading-zero    0开头的数字标记。(01, 02, 03, 等。)
                            lower-roman    小写罗马数字(i, ii, iii, iv, v, 等。)
                            upper-roman    大写罗马数字(I, II, III, IV, V, 等。)
                            lower-alpha    小写英文字母The marker is lower-alpha (a, b, c, d, e, 等。)
                            upper-alpha 大写英文字母The marker is lower-alpha (a, b, c, d, e, 等。)
            图像列表:list-style-image:url|none
            列表图像位置:list-style-position:outside|inside
            复合:ul{list:ul{URL} outside square}
css盒子模型:内容(content)、填充(padding)、边框(border)、边界(margin)
            边界属性:margin(-top|right|bottom|left):长度单位|百分比|auto    (上,右,下,左)
            边框属性:
                边框样式:border-style:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|
                    none    定义无边框。
                    hidden    与 "none" 相同。不过应用于表时除外,对于表,hidden 用于解决边框冲突。
                    dotted    定义点状边框。在大多数浏览器中呈现为实线。
                    dashed    定义虚线。在大多数浏览器中呈现为实线。
                    solid    定义实线。
                    double    定义双线。双线的宽度等于 border-width 的值。
                    groove    定义 3D 凹槽边框。其效果取决于 border-color 的值。
                    ridge    定义 3D 垄状边框。其效果取决于 border-color 的值。
                    inset    定义 3D inset 边框。其效果取决于 border-color 的值。
                    outset    定义 3D outset 边框。其效果取决于 border-color 的值。
                    inherit    规定应该从父元素继承边框样式
                        border-top-style:样式值
                        border-right-style:样式值
                        border-bottom-style:样式值
                        border-left-style:样式值
                边框宽度:border-width:medium|thin|thick|length
                        border-top-width:样式值
                        border-right-width:样式值
                        border-bottom-width:样式值
                        border-left-width:样式值
                边框颜色:border-color:color
                        border-top-color:样式值
                        border-right-color:样式值
                        border-bottom-color:样式值
                        border-left-color:样式值
                边框复合:border-width|border-style|border-color
                填充属性:padding:长度|百分比
                            padding-top
                            padding-right
                            padding-bottom
                            padding-left
css加div布局:
                
                
                

                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                

 

posted @ 2014-10-25 15:14  肉球  阅读(167)  评论(0编辑  收藏  举报