在 Compass & 中实现下拉菜单jQuery
I'm styling a website using Compass and jQuery. What is the best way for styling a list of lists as a horizontal menu with dropdown? A good example of such a menu can be seen here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我创建了一个 mixin,它可以引入 suckerfish 风格的跨浏览器下拉菜单所需的所有样式。这是链接:
https://github.com/adaambom/sucker-compass
只需添加一个参考 _suckerfish.scss:
假设您有一个无序列表存储在名为 #navigation 的 div 中,请将以下 scss 添加到您的主样式表中:
如果您想支持 IE6,请确保包含提供的 sfhover.js 文件。之后(确保编译您的项目),您应该有一个可用的下拉菜单。对于 4 行代码来说还不错。您应该将任何样式添加到导航声明中的下拉列表中。您可以使用 CSS 或 SCSS。
有关更多信息,请查看 github 存储库中的自述文件,并务必阅读以下内容:
http:// htmldog.com/articles/suckerfish/dropdowns/
I've created a mixin that pulls in all the styles needed for suckerfish style cross-browser dropdown menus. Here is the link:
https://github.com/adambom/sucker-compass
Just add a reference to _suckerfish.scss:
Assuming you have an unordered list stored in a div called #navigation, add the following scss to your main stylesheet:
If you want to support IE6, make sure to include the provide sfhover.js file. After that (make sure to compile your project), you should have a working dropdown menu. Not bad for 4 lines of code. You should add any styles to your dropdown within the navigation declaration. You can use CSS or SCSS.
For more info, check out the README in the github repo, and definitely give this a read:
http://htmldog.com/articles/suckerfish/dropdowns/