CSS selector with period in ID

前端 未结 3 1903
南方客
南方客 2020-11-28 06:37

The HTML spec allows for periods (.) in an id:

However, using a CSS ID selector rule will not match correc

3条回答
  •  庸人自扰
    2020-11-28 07:03

    You could also use the attribute selector like this:

    [id='some.id'] {
      color: #f00;
    }
    

提交回复
热议问题