Home > Article > Development Tools > How to create css in sublime
The steps to create a CSS file in Sublime Text include: 1. Create a new file; 2. Save the file and add the .css extension; 3. Add a CSS rule (selector {property: value}); 4 . Save and test (link CSS files to HTML).
How to create CSS in Sublime Text
Sublime Text is a popular text editor for coding and mark. Here are the steps to create a CSS file:
1. Create a new file
2. Save the file
.css
. For example, style.css
. 3. Add CSS Rules
<code>选择器 { 属性: 值; }</code>
<code>p { color: red; }</code>
Tip:
4. Save and test
Example:
Create a CSS file named style.css
with the following rules:
<code>body { background-color: #f0f0f0; } h1 { color: #000000; font-size: 24px; }</code>
Then, link to the CSS file in the HTML file:
<code><link rel="stylesheet" href="style.css"></code>
The above is the detailed content of How to create css in sublime. For more information, please follow other related articles on the PHP Chinese website!