列表菜单无法正常显示 [英] List menu not displaying properly

查看:105
本文介绍了列表菜单无法正常显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行的网站遇到了一个非常奇怪的问题。菜单最近已更改为使用javascript,有些人报告说,当他们第一次使用网站时,而不是一个很好地对齐的项目列表,每个项目都在自己的浅蓝色框中。他们看到了一个直截了当的< li>没有样式的列表。

最大的问题是,我认为只有在第一次有人访问该网站时才能看到它,所以我看不到它!


因此,如果有人可以查看网站 Lenzie.org.uk 并报告他们看到的内容(以及他们正在使用的浏览器)我非常非常感谢!!!

问题


除非我已修复它,否则问题是:浏览器如何加载UL列表,就像它没有看到样式表一样据我所知,样式表清晰可见并可以通过任何可以浏览网站的浏览器下载?

技术资料


菜单是< ul>< li> ..列表。该样式由css/styles/menu.css"控制,然后一些java加载js / menu.js。并隐藏所有子菜单,只留下主要项目,直到鼠标悬停在它上面。 (除了带有框架的页面,我必须使用非常不同的菜单布局)


不幸的是,加载UL列表非常笨重,因为巨大的列表出现,并且只有当整个页面已加载,javascript是否启动以整理它。所以我现在使用cookie来决定**如果某人有javascript并且如果设置了cookie,则PHP代码为UL列表的visibility属性设​​置div。到隐藏,它阻止了加载的强大UL列表并弄乱了整个屏幕。

提前致谢!


**逻辑是:如果你有一个cookie集,我假设你有javascript和所以不要让菜单在天生可见 - 但我留下一个< noscript>链接,其中cookie设置为可见

I am having a very odd problem with a website I run. The menus have recently been changed to use javascript and some people are reporting that when they first use the site, Instead of a nicely aligned list of items each in its own light-blue box. They are seeing a straightforward <li> list with no styles.

The biggest problem is that I think it is only seen the first time someone goes to the site and so I can''t see it!!!

So if anyone could just look at the site Lenzie.org.uk and report what they see (and the browser they are using) I would very very much appreciate it!!!

Question

Unless I''ve fixed it, the question is then: "How is it possible for a browser to load the UL list as if it hasn''t seen the style sheet when as far as I can tell the style sheet is clearly visible and downloaded by any browser that can view the site?

Technical stuff

The menu is a <ul><li>.. list. The style is controlled by a css "/styles/menu.css", and then some java loads "js/menu.js" and hides all the sub-menus leaving just the main items until the mouse hovers over it. (Except on pages with frames where I have to use a very different menu layout)

Unfortunately, loading the UL list is very clunky, as the huge list appears, and only when the whole page has loaded, does the javascript kick in to tidy it up. So I now use a cookie to "decide"** if someone has javascript and If the cookie is set, the PHP code sets the div for the "visibility property of theUL list " to "hidden", which stops the enornous UL list being loaded and messing up the whole screen.

Thanks in advance!

**The logic is: If you have a cookie set, I assume you have javascript and so don''t want the menu to be innitially visible - but I leave a <noscript>link where the cookie is set to "visible"

推荐答案

否在XP IE / 6或IE / 7中发布此结尾,也不在Mac OS X 10.4.11最新版本Opera,Safari,SeaMonkey,Camino和Firefox中发布。
No issue this end in XP IE/6 or IE/7, nor in Mac OS X 10.4.11 latest versions Opera, Safari, SeaMonkey, Camino, and Firefox.


David,

比我预期的任何人做的检查大约多6倍,并且知道它似乎没问题(手指交叉),这是一个巨大的解脱。


谢谢!!
David,

that is about 6x more checking than I ever expected anyone to do and a tremendous relief to know that it seems to be OK (fingers crossed).

Thanks!!


是的,在Chrome上运行得非常好。但是,我应该注意这个网站对癫痫患者是危险的


只是在开玩笑。
Yep, works wonderfully on Chrome. I should, however, note that this website is dangerous to epileptics.

Just joking.


这篇关于列表菜单无法正常显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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