There are three writing formats for css
Inline style: means to write the style inline
For example
write my color with inline style
only applies to
(font color and background color) and tags inside , but it does not apply to tags outside such as: head, title, etc.
Embedded styles: Use style to uninstall all styles in style.
For example:
<head> <style> p{ color:red; background:blue; border:1px solid green; } </style> </head> <body> <p>用内嵌方式编写我的样式</p> </body>
External link style: The popular point is the external style, which uses the link style to connect to the external .css file.
For example:
<head> <link style="stylesheet" href="class.css" type="text/css" /> </head>
Yes, it’s so simple. You only need to write the css style to another .css text and then just link it on the page. The style is displayed in , but be sure to pay attention to the file path! ! ! It’s okay if the path is wrong.
I personally recommend using external style, which separates css and layout code, making the code more editable and loading faster.
The above detailed explanation of the writing format of citing css style is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support the PHP Chinese website.
For more detailed examples of css style writing formats and related articles, please pay attention to the PHP Chinese website!