CSS 选择器 知识点

<html>
<head>
    <style type="text/css">
        h1 > strong { /*子元素选择器 只选择自己 的子元素 子的子不管 */
            color: red;
        }

        h2 strong { /*后代选择器 选择子元素 子的子 */
            color: red;
        }
    </style>
</head>

<body>
    <h1>This is <strong>very</strong> <strong>very</strong> important.</h1>
    <h2>This is <em>really <strong>very</strong></em> important.</h2>
</body>
</html>

 

jQuery

 

posted @ 2019-05-11 20:25  一只桔子2233  阅读(193)  评论(0编辑  收藏  举报