在下面的例子中,选择器匹配所有 <p> 元素中的第一个 <i> 元素:
<html>
<head>
<style type="text/css">
p > i:first-child {
font-weight:bold;
}
</style>
</head>
<body>
<p>some <i>text</i>. some <i>text</i>.</p>
<p>some <i>text</i>. some <i>text</i>.</p>
</body>
</html>
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css-tool/t52315.shtml








