点在以下多个选择器代码中的含义是什么

时间:2017-10-14 08:27:16

标签: html css

...
file2modify.Descendants("label").First().Value = content;
file2modify.Save(@"D:\14.10.2017\xyz.xml");

我正在谈论p和芥末之间的点

2 个答案:

答案 0 :(得分:2)

这是类选择器,它选择具有类p的每个mustard元素。在这种情况下,只有当它们是具有hotdog类的元素的后代时才会选择它们。

答案 1 :(得分:0)



.hotdog {
  background: orange;
  padding: 10px;
}
.hotdog.chilli {
  background: brown;
}
.hotdog .ketchup {
  background: red;
}
.hotdog p.mustard {
  background: yellow;
}

<div class="hotdog">
  hot diggidy dog
  <p class="ketchup">ketchup</p>
  <p class="mustard">mustard</p>
</div>

<div class="hotdog chilli">
  chilli dog??
</div>
&#13;
&#13;
&#13;

相关问题