如果您是 Web 设计师并正在设计网站或小部件,那么您需要将文件托管在快速的 CDN 服务器上,以便您的代码或模板用户可以顺利地在网站或博客中使用您的代码,因此为此您需要一个超快速的服务器,但这将贵。那么为什么不在一些调整后尝试一些免费服务呢? 谷歌速度之快,无人能及,您更清楚为什么不使用谷歌服务器作为您自己的托管服务器。所以,是的,您可以使用它并且 100% 免费。在此处托管您的文件后,可以为您提供更多功能,例如超快速加载、最佳 SEO 和良好的加载时间。您可以轻松地在此处托管您的 JavaScript、CSS 和 HTML 文件。你也可以分享它,其他人也可以使用它或嵌入它 ## 如何托管 HTML、CSS、JavaScript 文件? 1.) 生成你的文件: **CSS 文件 打开记事本并粘贴 CSS 代码(如果它包含在 tags, remove them). In the Notepad menu, select ‘File’ > ‘Save as’ and type the file name with the .css extension just like I did with mycssfile.css – see the screenshot below In the same window, choose “All files” in the “Save as type” option and set the Character Encoding to UTF-8. If you want to host a JavaScript file, add the .js extension (instead of .css) at the end of your file name (remove the tags if you see them). Click “Save” and navigate to the location where you want to save the file 2.) Upload Your File On Google Drive: Open httpsdrive.google.com and log in with your Gmail account. After you logged in, click on the ‘Create’ button and add a new separate folder to upload your JavaScript and CSS files Just after creating the folder, make it public so that whatever you will share in this folder will be accessible to the public. So “Right Click” on the folder and select “Share” Then click on “Advance Sharing” to open more setting and make it like below Open the newly created folder and “Upload” your HTML,CSS,JS files. After the files have been successfully uploaded, right click on the file names and select “Get Link” 3.) Get The Shareable Link: When you will get the link that the link will be something like httpsdrive.google.com/open?id=0B8dPWvOrtDiAS01WenpMSHcxMkk Before you can use the links, you must replace httpsdrive.google.com/open?id= to httpsgoogledrive.com/host/ so it will become httpsgoogledrive.com/host/0B8dPWvOrtDiAS01WenpMSHcxMkk ## Last Words: As you can see, changing your file storage out so that is CSS and JavaScript is stored on your Google Drive account is easy to do and only takes a few minutes. After you make the change, you can begin benefiting from faster loading speeds, higher SEO rankings, and overall a more convenient platform to work from to increase the efficiency of your work.