Home  >  Article  >  Web Front-end  >  CSS第一次加载失效的问题_html/css_WEB-ITnose

CSS第一次加载失效的问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:44:221306browse

CSS HTML

写了一个网站,网站在第一次进入的时候css无效,刷新后显示正常。
网站中的css代码如下
    <style type="text/css">        #ShowDetailInfo li        {            list-style: none;            border-bottom-style: solid;            border-bottom-color: #C0C0C0;            height: 100px;            border-bottom-width: thin;            border-top-width: thin;            border-top-color: #C0C0C0;            border-top-style: none;        }        .img div        {            max-height: 100px;            max-width: 100px;        }        #ShowDetailInfo a        {            text-align: center;            text-decoration: none;            color: #000000;        }        .info p        {            text-align: center;            color: #696969;        }        .GoodType li        {            list-style: none;            display: inline;            width: 320px;        }        .login        {            text-align: right;        }    </style>

在firefox里面看了下,第一次进入的时候,这段css代码 只有
      .login        {            text-align: right;        }

其余的全部没有加载成功,求大神指点如何解决

回复讨论(解决方案)

应该你代码加了什么限制第一次访问什么的只输出那个类吧。。要不怎么会加载不了。。

应该你代码加了什么限制第一次访问什么的只输出那个类吧。。要不怎么会加载不了。。

后来 我又尝试了好几次,发现的问题是,如果从其他页面点击链接进入 这个页面,那么回出现这个问题,如果是直接在地址栏输入该页面url 则正常显示...

怎么没有人 回答啊...
大神都去哪里了.....

不是一个页面。

不是一个页面。
地址都是相同的url...

检查过滤器什么,你的应该不是.html之类的静态文件,应该是url重写过的,进行了一些判断什么的。。

如果是.html文件不会出现这种问题。如果网速慢也不会只下载最后的,只可能是下载了前面的,后面没有下载

谢谢已经找到问题了
这边使用了模板,和模板有点冲突,已经解决了 谢谢

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn