How important is it to leave out the last ';' inside a set of CSS rules?

后端 未结 3 1324
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 18:52

I\'ve had problems with Internet Explorer not applying the last property in a list of CSS properties. Is it necessary to leave out the last ; from a list of CSS

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-14 19:28

    You don't need to include the last semi-colon. Nor do you have to exclude it. It's optional.

    From a maintenance point of view, I'd actually get into the habit of including after every property. Accidentally forgetting to put one one in when editing can cause some subtle errors.

    I am not aware of any issue with IE causing issues with missing semi-colon's - either that was an awful long time ago or there was some other issue that maybe lead you to believe that was the problem ;)

提交回复
热议问题