css 伪类

1. js 删除一个元素:   

 [1, 2, 3, 4].splice([1, 2, 3, 4].indexOf(3),1);

2. css 背景颜色透明而文字不透明:http://blog.imbolo.com/css3-rgba-advanced-usage/
    在需要设置颜色的地方都可以使用RGBA, css3的解释如下:

    /* 基本语法 */
    em { color: Rgba(red,green,blue,opacity) }
    /* 举例 */
    em { color: rgba(255,0,0,1) }    /* 红色,不透明 */
    em { color: rgba(100%,0%,0%,1) } /* 同上 */

3. CSS中的第一个:first-letter; 最后一个:last-child; 第n个:nth-child
   根据指定的选择器选定页面或父元素的第n个元素 : TODO, 可以用类选器不

    <table>
        <tr>
            <td class="a">11</td>
            <td class="b">22</td>
        </tr>
        <tr>
            <td class="a">11</td>
            <td class="b">22</td>
        </tr>
    </table>

    这两个在class上是不能用的

    td:last-child{color: blue;}
    td:nth-child(1){color: red;}

 

posted @ 2013-01-25 18:58  海边菩提  阅读(121)  评论(0)    收藏  举报