如何使用 CSS 获得下拉功能?
我一直在搞乱这个网站的CSS。我不知道如何让“医疗”菜单项下拉并显示其余的隐藏菜单项。我已经能够取消隐藏并展开它们,但无法将它们下拉。具体来说,我需要改变什么?我尝试了一些教程,但也许我的目标错了?另外,我正在编辑一个主题。也许有什么东西在干扰?请帮助我检查下面的 CSS 并建议一些更改。
谢谢你!
http://madhwaparishat.co.uk/drupal /sites/all/themes/sky/css/style.css?lj2u6r
I've been messing with this site's css FOREVER. I can't figure out how to get the "medical" menu item to drop-down and display the rest of the hidden menu items. I've been able to unhide them and expand but not get them to drop-down. What have I got to change, specifically? I tried some tutorials, but maybe I targeted wrong? Also, I'm editing a theme. Maybe something is interfering? Please, help me by inspecting the CSS below and recommending some changes.
thank you!
http://madhwaparishat.co.uk/drupal/sites/all/themes/sky/css/style.css?lj2u6r
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个:
你的网站上有大量疯狂的 css
@imports
,很难调试。 <代码>! important 规则是必要的。您还需要为下拉链接选择特定的宽度,我使用的是 100px。
希望这有帮助,我本来不想回答,但我看到人们试图向你扔吸盘鱼,而这不是你想要的 - 你想自己做。完全明白了。
编辑:如果你想支持 IE6 和 7,这可能需要调整,或者需要涉及 javascript。
编辑:回来并修剪代码。之前的事情太多了,很混乱。
Try this:
There's a ton of crazy css
@imports
on your site, hard to debug. The! important
rule was necessary.You also need to pick a specific width for you dropdown links, I used 100px.
Hope this helps, I wasn't going to answer but I saw people trying to throw Suckerfish at you, and that's not what you're after - you want to do it yourself. Totally understand.
EDIT: This will probably have to be tuned or javascript will need to be involved if you want to support IE6 and 7.
EDIT: Came back and trimmed the code. There was too much before and it was confusing.
基本上,您需要 suckerfish 下拉列表。
Basically, you want the suckerfish dropdown.