setting font color of inside a li tag

后端 未结 9 1470
臣服心动
臣服心动 2021-02-20 07:26

My markup looks like:


I want th

9条回答
  •  梦谈多话
    2021-02-20 07:29

    The most specific CSS selectors would probably be

    div.c1 > li.c2 > a:link,
    div.c1 > li.c2 > a:active,
    div.c1 > li.c2 > a:hover,
    div.c1 > li.c2 > a:visited {
        color: red;
    }
    

    The more specific the CSS selectors, the less work for the browser's rendering engine.

    However, something is wrong with your markup if this is supposed to be HTML and the

  • element's parent is a
    instead of
      or
        .

提交回复
热议问题