• css3学习下...


    a[href^="http:"]{}//所有以http开头的href元素

    a[href$="pdf"]{}//所有以pdf结尾的href元素

    a[href*="xxx"]{}//所有包含xxx内容的href元素

     <style>

        a[href^="http:"]{

             background:url("images/rar.png") no-repeat left center; 

            background-color: #dddddd;

            border:2px dotted;

        }

        a[href$="word.com"]{

            background: url("images/word.png") no-repeat left center;

            padding-left: 18px;;

        }

        a[href$="pdf.com"]{

            background: url("images/pdf.png") no-repeat left center;

            padding-left: 18px;;

        }

        a[href$="rar.com"]{

            background: url("images/rar.png") no-repeat left center;

            padding-left: 18px;;

        }

        a[href*="com"]{

            color: green;

        }

         全局 同body 

         :root{}

        tr:nth-child(odd)

        tr:nth-child(even)

        odd = 2n even = 2n+1 一奇一偶 

        倒数第二个 

        tr:nth-last-child(2){} 

        tr:nth-of-type(3){} 

        th:nth-of-type(3){} 

        td:nth-of-type(3){}

        td:last-child{} 

        td:first-of-type{}

        td:last-of-type{} 

        只有一个td的行 

        td:only-child{}

        td:only-of-type{}

        td:empty{}

        </style>

    <body>


    <p><a href="http://www.pdf.com">http://www.pdf.com</a></p>
    <p><a href="http://www.rar.com">http://www.rar.com</a></p>
    <p><a href="http://www.word.com">http://www.word.com</a></p>
    <p><a href="http://www.pdf.com">http://www.pdf.com</a></p>
    <p><a href="http://www.rar.com">http://www.rar.com</a></p>
    <p><a href="http://www.word.com">http://www.word.com</a></p>
    <table>
        <tr><th>111</th><th>34444</th><th>333</th></tr>
        <tr><td>11111111111</td><td>22222222222222</td><td>33333333333333</td></tr>
        <tr><td>444444</td><td>55</td><td>66</td></tr>
        <tr><td>11111111111</td><td>22222222222222</td><td>33333333333333</td></tr>
        <tr><td>1</td><td>222222221222222</td><td>333333334333333</td></tr>
        <tr><td>111112111111</td><td>222222222222222</td><td>3333343333333333</td></tr>
        <tr><td>11111111111</td><td>22222222222222</td><td>33333333333333</td></tr>
    </table>

    </body>

  • 相关阅读:
    Delphi源程序格式书写规范
    ORACLE常用傻瓜问题1000问
    世界上最健康的作息时间表
    poj1657
    poj1604
    poj1654
    poj1635
    poj1655
    成为一个不折不扣的时间管理专家[推荐]
    男人的十三怕
  • 原文地址:https://www.cnblogs.com/doublegi/p/5747967.html
Copyright © 2020-2023  润新知