Page-specific css rules - where to put them?

后端 未结 11 1921
粉色の甜心
粉色の甜心 2021-02-05 05:52

Often when I\'m designing a site, I have a need for a specific style to apply to a specific element on a page and I\'m absolutely certain it will only ever apply to that element

11条回答
  •  遥遥无期
    2021-02-05 06:45

    There are four basic cases:

    1. style= attribute. This is the least maintainable but easiest to code. I personally consider use of style= to be a bug.