XAMPP不会加载我更新的CSS文件

编程入门 行业动态 更新时间:2024-10-28 04:28:27
本文介绍了XAMPP不会加载我更新的CSS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用XAMPP在本地主机上拥有我的网站.每次编辑文件时,都将其扩展名从 .php 更改为 .html ,以便能够使用WebStorm对其进行正确编辑.

I have my site on the localhost by using XAMPP. Every time I edit a file, I change its' extension to .html from .php to be able to edit it properly with WebStorm.

由于某些原因,我注意到如果在服务器上的文件夹中修改 css/scss 时,将不会加载更新的css.为什么会这样?

I noticed for some reason if I modify the css/scss while the folder on the server, the updated css will not be loaded. Why is that?

现在,我每次都要编辑CSS时,都必须编辑从 .php 到 .html 的所有内容,并将文件夹移出XAMPP.而且即使我再将文件移到XAMPP文件夹中,我的某些CSS也仍然无法工作..?

Now I have to edit everything from .php to .html and move folder out of XAMPP every time I have to edit CSS. And even if I then move again the file into the XAMPP folder, some of my css still wont work..?

推荐答案

为此提供3种解决方案.

3 solutions for this.

  • 在浏览器中使用隐身模式.

    刷新以查看CSS时,请使用 control + f5 缓存刷新.

    When you refresh to see the css use control+f5 so you do cache-refresh.

    从浏览器的开发者控制台中删除缓存.

    Remove cache from the developer console of your browser.

    最适合您的选择(我个人使用第二个)

    Pick which fits best for your (personally i use the second one)

  • 更多推荐

    XAMPP不会加载我更新的CSS文件

    本文发布于:2023-11-02 03:23:27,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1551234.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:加载   文件   XAMPP   CSS

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!