登录 | 注册 | FAQ
Anonymous

Comments in CSS?

+ 发表回复

12 篇帖子 1, 2


Re: Comments in CSS?

branko97 » 周一 2月 12, 2018 4:49 pm

lisaja 写道:How can I insert comments in CSS?

In HTML I use "<!-- comment -->". But it doesn't work in CSS.

Thanks,

Lisa


Good tip, thanks.
头像

branko97

  • 帖子: 1
  • 注册: 周三 11月 29, 2017 12:39 pm

Re: Comments in CSS?

alviya000 » 周四 6月 07, 2018 10:31 am

body {
font-size: 62.5% /* 1em = 10px */
}


The stuff inside the /* */ marks are CSS comments. This allows you to enter notes into CSS that will not be interpreted. In this case, this comment lets someone reading the CSS file know that that particular line of CSS was intended to allow for using ems to set font size later in the CSS in a more intuitive base 10 way.
头像

alviya000

  • 帖子: 1
  • 注册: 周四 6月 07, 2018 10:28 am


+ 发表回复

1, 2