Escape character copyright: © It’s going to generate ©

class

 [class=borderd]{/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
Copy the code

The new shorthand:.borderd{} is also common. The writing of

Id If the element is unique to the page, if not, use class. Never use ID unless you have to, because id doesn’t give an error, class is enough

What does the Internet say the only id is fart

[id=xxx]{}
/* Short form */
#xxx{}
Copy the code

Id has two functions: CSS related and JS related

JS can get the ID directly

   xxx.style.border = "1px solid blue"
Copy the code

Style priority: JS > style > CSS

tabindex

tabindex = 1 /* the first access to this */
tabindex = 0 /* Last */
tabindex = -1 /* TAB can never find me */
Copy the code

title

/* Omit */ if the text is too long
white-space:nowrap;
text-ovferlow:ellpsis; /* Ellipsis appears if the text is out */
ovferlow:hidden;
Copy the code

Title =” Description”