要在 webstorm 中新建 css 文件:打開項目結構,在目標文件夾右鍵單擊“新建”>“CSS 文件”。輸入文件名稱,選擇預設模板、編碼,是否包含文件標題,再單擊“創建”。
如何在 WebStorm 中新建 CSS 文件
新建 CSS 文件的步驟:
- 打開 WebStorm 并創建一個新的工程或打開一個現有工程。
- 在項目結構中導航到要創建 CSS 文件的文件夾。
- 右鍵單擊文件夾并選擇“新建”>“CSS 文件”。
- 輸入新 CSS 文件的名稱。
- 單擊“創建”。
高級選項:
- 選擇預設模板:WebStorm 提供了多種預設 CSS 模板,例如重置樣式表或網格布局。您可以從“模板”下拉列表中選擇您需要的模板。
- 設置編碼:確保選擇正確的編碼,例如 UTF-8 或 UTF-16。
- 添加文件標題:包括的文件標題將出現在 CSS 文件的開頭。您可以選擇是否包含它。
新創建的 CSS 文件將如下所示:
立即學習“前端免費學習筆記(深入)”;
/* * CSS Reset * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) */ /* Box sizing rules */ *, *::before, *::after { box-sizing: border-box; } /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */ ul[role="list"], ol[role="list"] { list-style: none; } /* Fix margins for blockquote elements in IE 11+ */ blockquote { margin: 0; } /* Normalize line height for headings 1 to 6 in Chrome, Firefox, and Safari */ h1, h2, h3, h4, h5, h6 { line-height: 1.2; } /* Remove all animations and transitions for people that prefer not to see them */ @media (prefers-reduced-motion: reduce) { * { animation-duration: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0ms !important; scroll-behavior: auto !important; } }
您現在可以開始在 CSS 文件中編寫樣式。
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦