简体   繁体   English

文件夹结构更改时将 HTML 文件重新链接到 CSS

[英]Re-linking HTML files to CSS when folder structure changes

Say I have a large number of HTML and CSS files, and I need to re-organize their folder structure.假设我有大量的 HTML 和 CSS 文件,我需要重新组织它们的文件夹结构。 Are there any shortcuts (in VS Code preferably) to changing the links to stylesheets and hypertext links that the HTML files contain?是否有任何快捷方式(最好在 VS Code 中)来更改 HTML 文件包含的样式表和超文本链接的链接?

Or would I have to do it all manually (restructure the folders and then manually copy each individual file path into it's respective point in each HTML file?)还是我必须手动完成所有操作(重组文件夹,然后手动将每个单独的文件路径复制到每个 HTML 文件中的相应点?)

If the links to the files are within HTML or any other file, VS Code offers feature called "find and replace" First one is what you want to change, second one is to what you want to change it to.如果文件的链接在 HTML 或任何其他文件中,VS Code 提供称为“查找和替换”的功能第一个是您要更改的内容,第二个是您要更改的内容。

Search menu > Replace.搜索菜单 > 替换。 And then you can either select "replace" or "replace all".然后您可以选择“替换”或“全部替换”。

https://code.visualstudio.com/docs/editor/codebasics https://code.visualstudio.com/docs/editor/codebasics

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM