css 权重 探索

效果是: blue

 

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
     ul li p.p{color: yellow}
     ul li.li p{ color: red}
     ul li:first-child p{color: blue}
     ul li .p{color: #ccc}
    </style>
    <title></title>
    <script src="../scripts/jquery.js"></script>
    <script>
        $(function () {

            });
    </script>
</head>
<body>
    <ul>
        <li class="li"> <p class="p"> hello</p> </li>
    </ul>
</body>
</html>

 

posted @ 2015-10-11 13:04  哪有公园可以住的呀  阅读(91)  评论(0)    收藏  举报