Use an ID Attribute to Style an Element - zilongxuan001/LearnFreecode GitHub Wiki

理解

可以在CSS里设置id属性,在<style></style>里设置

<style>
   #cat-photo-element {
  background-color: green;
}
</style>

#cat-photo-element ,#是id在CSS里的标识。cat-photo-element是id的名称。

在HTML里引用如下

<form id="cat-photo-element"></form>

来源

Basic CSS: Use an id Attribute to Style an Element | Learn freeCodeCamp

CHANGELOG

2018-9-29 17:15:22

⚠️ **GitHub.com Fallback** ⚠️