I've fiddled around with some mega menus, but I can't get them to use a fixed position for the drop down content. All of them shows the content like this: http://www.sohtanaka.com/web-design/examples/mega-dropdowns/
But I want it to show up like this (no need for the fancy effects though) : simplifiedsafety.com/
I think I got it fixed, with the code HerrSerker posted
Working code for others: http://jsfiddle.net/aT3nQ/embedded/result/ This doesn't use js or jQuery though.
将position:relative
对于li
放下,将position:relative
对于ul
添加,并将position:absolute;left:0
赋予.sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.