What are the seven aspects of writing efficient CSS?
In this issue, the editor will bring you what are the seven aspects of writing efficient CSS attention. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Are you familiar with how to write efficient CSS? here are seven points for attention in writing efficient CSS, including using external styles instead of interline or embedded styles, and recommending using link to introduce external stylesheets.
CSS experience sharing: seven aspects of writing efficient CSS attention
As CSS page layout is more and more widely used, more and more CSSer begin to write CSS. How can we write efficient and standardized CSS code? this article introduces seven aspects that you must pay attention to:
First, use the external style to replace the interline style or embedded style
Interline style is not recommended
ExampleSourceCode
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Pagetitle-52css.comtitle > head > .p > body > html >
Inline styles are not recommended
ExampleSourceCode
"http://www.w3.org/TR/html4/strict.dtd"> Pagetitle-52css.comtitle > p {color:red;} style > head > .body > html >
Recommend the use of outreach style
ExampleSourceCode
"http://www.w3.org/TR/html4/strict.dtd"> @ importurl (" styles.css "); style > head > .body > html >
Recommend the introduction of external stylesheets
ExampleSourceCode
"http://www.w3.org/TR/html4/strict.dtd">