在浏览器中看不到 CSS 样式更改 [英] Can't see CSS style changes in Browser

查看:35
本文介绍了在浏览器中看不到 CSS 样式更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的伙计们.我对编码并不陌生,我想认为我并不愚蠢,但我对这个问题不知所措,并且没有什么可以尝试的了.

Okay guys. I'm not new to coding, I'd like to think I'm not stupid, but I'm at my wits end with this issue, and am running out of things to try.

问题:
尝试更新 Wordpress 样式表.无论我做什么,我都看不到浏览器中的变化,但我的老板可以对其进行很好的更新.到目前为止,这只是 3 个站点上的问题(2 个 wordpress 1 个自定义构建).并非所有网站.

Problem:
Trying to update a Wordpress stylesheet. I can't see changes in the browser no matter what I do, but my boss can make updates to it fine. This is only an issue on 3 sites so far (2 wordpress 1 custom built). Not all sites.

我尝试过的事情:

  • 在 wordpress 上更新了 css - 保存得很好 - 通过 FTP 查看更新日期,时间戳是新的 - 刷新网站,在浏览器中看不到样式表的变化

  • updated css on wordpress - saves fine - looked at update date via FTP and the timestamp is new - refresh website, can’t see changes in stylesheet in browser

通过 FTP 下载了 css 文件,有来自 wordpress 更新的更改 - 尝试添加更多更改/样式并重新上传 - 仍然无法在浏览器中看到样式表更改.

downloaded css file via FTP, changes from wordpress update are there - try to add more changes/styles and re-upload - still can’t see stylesheet changes in browser.

删除所有历史记录.缓存、浏览器数据等,在 firefox、chrome 和 safari 中 - 在浏览器中没有看到变化

deleted all history of everything. Cache, browser data etc, in firefox, chrome, and safari - no changes seen in browser

尝试使用 Dreamweaver 上传文件 - 未看到任何更改

tried uploading files with dreamweaver - no changes seen

尝试使用以下命令刷新终端中的 DNS 缓存:sudo killall -HUP mDNSResponder 和 sudo dscacheutil -flushcache - 没有看到任何变化

tried flushing DNS cache in terminal with: sudo killall -HUP mDNSResponder, and sudo dscacheutil -flushcache - no changes seen

使用主机/服务器上的文件管理器更新了 css 文件 - 没有看到任何变化

updated the css file using filemanager on the host/server itself - no changes seen

拔掉路由器,重新插入 - 没有看到任何变化

unplugged router, plugged back in - no changes seen

尝试在 WiFi 上上传,然后直接插入互联网 - 没有看到任何变化

tried uploading on WiFi, and directly plugged into the internet - no changes seen

尝试在 chrome 隐身模式下查看 - 没有看到任何变化

Tried viewing in chrome incognito - no changes seen

检查文件权限,文件夹是755,文件是644

Checked file permissions, Folders are 755, files are 644

wordpress 上没有安装缓存插件.所以没有什么需要清除的.

There is no caching plugin installed on wordpress. So nothing to be cleared there.

通过未看到更改",我实际上是在查看 firebug/web 检查器中的样式表代码,看起来样式表没有任何更改.并不是说我只是输入了错误的 CSS 选择器而它不起作用.

By 'no changes seen', I am actually looking at the stylesheet code in firebug/web inspector, and it looks like no changes have been made to the stylesheet whatsoever. Not that I just typed in a wrong CSS selector and it's not working.

任何关于我的电脑到底发生了什么以及如何修复它的建议都会非常有用.这让我抓狂!!我使用的是 Mac OS X 10.9.4

Any suggestions on to what the heck is going on with my computer and how to fix it would be greatly appriciated. This is driving me nuts!! I'm using a Mac OS X 10.9.4

http://www.wareinterventions.com/wp-content/主题/ware/style.css

我在样式表中看到的最后一个样式是:

The last style I can see in the stylesheet is:

.hms-testimonial-group .cf-type

但我应该看到这些:

#test{}
#test2{}
#slider .caption span{
    color: red;
}
#slider .caption h2{
    color: green !important;    
}

推荐答案

您的浏览器正在缓存 CSS 文件.您可以尝试转到原始链接并执行 Ctrl/Cmd + R(Ctrl/Cmd + Shift + R,硬重新加载)并查看是否清除它.

Your browser is caching the CSS file. You can try going to the original link and doing Ctrl/Cmd + R (Ctrl/Cmd + Shift + R, hard reload) and see if that clears it.

最好的方法是使用浏览器的开发者工具禁用缓存.

The best way is to disable the cache using the browser's developer tools.

如果您使用的是 Chrome,请点击菜单图标 > 更多工具 > 开发者工具,然后点击齿轮图标.您应该会看到一个禁用缓存的选项.对于 Firefox,单击菜单图标 > 开发人员,然后单击切换工具.然后单击齿轮并选中禁用缓存.

If you are on Chrome, click the Menu icon > More Tools > Developer Tools and click the gear icon. You should see an option to disable cache. For Firefox, click the Menu icon > Developer and click on Toggle Tools. Then click the gear and check disable cache.

这篇关于在浏览器中看不到 CSS 样式更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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