E#id

匹配id为 "id"的元素E (来源: W3C).

HTML:

  1. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
  2. <p id="teasertext">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>

CSS:

  1. p#teasertext{font-weight:bold}

输出:

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

在这个例子中,第二段会以粗体显示