CSS代码仅在网站上线时不起作用 [英] CSS code not working only when website is live

查看:70
本文介绍了CSS代码仅在网站上线时不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的网站 matthewbellanalytics.com 上,并且我一直在尝试进行一些更改到联系页面contact.css CSS上.我编辑了CSS文件,但离线看到的更改没有在线反映出来.

I'm working on my website, matthewbellanalytics.com, and I have been trying to make some changes to the contact.css CSS of the contact page. I edited the CSS file and the changes that I was seeing offline weren't reflected online.

具体来说,我更改了background-color:blue,它可以脱机工作,如下所示:

Specifically, I changed the background-color:blue, which worked offline as seen here:

然后我在hostgator服务器上替换了该文件,并通过从cPanel重新下载CSS文件再次检查了是否已正确替换了该文件.

I then replaced that file on my hostgator server and I double checked that it was replaced correctly by re-downloading the CSS file from my cPanel.

background-color:blue肯定仍然是代码的一部分.

background-color:blue was definitely still part of the code.

但是当我在线查看网站时. background-color:blue,神秘地不再是CSS文件的一部分.

But when I view the website online. background-color:blue, is mysteriously not part of the CSS file anymore.

我认为这一定是缓存问题,因此我清除了Firefox和chrome上的缓存,但还是没有运气.然后,我尝试在Opera上打开以前没有做过的网站,因此应该没有缓存.没运气.

I assumed this must be a caching issue so I cleared the cache on both firefox and chrome, but still no luck. I then tried opening the website on Opera which I haven't done before so there should be no cache. No luck.

在线页面仍未更新为蓝色,如下所示:

The online page still isn't updating to blue, and looks like this:

推荐答案

通过进入开发人员工具并在网络"标签下禁用了缓存,我可以在chrome中解决此问题,而在Firefox中则无法解决.似乎没有其他清除缓存的方法起作用.

I was able to solve it in chrome, but not firefox, by going into the developer tools and disabling the cache from there under the "network" tab. No other method of clearing cache seems to work.

这篇关于CSS代码仅在网站上线时不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆