为什么我的页面可以在 Firefox 中运行,但不能在 Safari 或 Chrome 中运行?
我对它进行了 HTML 验证,它在 Firefox 中看起来正是我想要的样子,但在Chrome 和 Safari 中 #main div 没有显示背景颜色,并且 css 设置为清除的中断标记都不像 Firefox 中那样清除。
我无法弄清楚我做错了什么,因为它在 Firefox 中运行良好并且还可以进行 HTML 验证。有人可以看一下吗?
此外,这是编码错误还是虚拟主机问题?我不断获得网页的旧版本和新版本,具体取决于我是否执行简单刷新或 Ctrl+Shift+R 刷新。
正如 mrtsherman 和 Nicole 所说,这只是缓存。隐私浏览显示一致。
I HTML validated it and it looks just the way I want it to in Firefox but in Chrome and Safari the #main div doesn't have the background color showing and the break tag with css set to clear both doesn't clear the way it does in Firefox.
I can't figure out what I did wrong considering it works fine in Firefox and it also HTML validates. Can anybody take a look at it?
Also, is this a coding error or a Web Host problem? I keep getting an old and new version of the Web page depending on if I do a simple refresh or a Ctrl+Shift+R refresh.
As mrtsherman and Nicole said, it was just the cache. Private browsing shows consistently.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要在
#main
结束标记之前添加。我不应该与您的浏览器缓存或网络托管有任何关系。
you need a
<div style='clear:both'></div>
right before the#main
closing tag. I shouldn't have anything to do with your browsers cache or web hosting.我认为这可能是一个缓存问题。该页面对我来说似乎渲染得很好。这是快速提示。要从图片中删除缓存,请打开隐身/私人浏览实例。然后让我们知道您看到了什么。我认为这会解决它。如果这是问题所在,那么您可以通过附加
.css?version=1.1
来对 CSS 文件进行版本控制。如果您在服务器端执行此操作,则可以附加时间戳来自动执行此操作。I think it is probably a caching issue. The page seems to render fine to me. Here is quick tip. To take caching out of the picture, open up an incognito/private browsing instance. Then let us know what you see. I think this will resolve it. If this is the problem then you can version your CSS files by appending
.css?version=1.1
for example. If you do this server side you can append a timestamp to do this automatically.:)
为了提供更多帮助 1. 您应该提供您正在使用的代码。这对于找出问题所在有很大帮助。 2. 在我看来,该网站的旧版本和新版本听起来像是您需要清除浏览器缓存。
:)
To help out a bit more 1. You should provide the code you are working with. It is a major help in trying to figure out what is going wrong. And 2. the old and new version of the web site sounds to me like you need to clear your browser cache.