CSS第一次加载失效的问题_html/css_WEB-ITnose
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文件不会出现这种问题。如果网速慢也不会只下载最后的,只可能是下载了前面的,后面没有下载
谢谢已经找到问题了
这边使用了模板,和模板有点冲突,已经解决了 谢谢

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.
