admin管理员组文章数量:1421031
I am trying to implement a drop up menu. As a starting point I am using an existing drop down menu built using HTML/CSS/jQuery based on CSS trick's Simple jQuery Dropdowns. (As I couldn't get a pure css one to work on touch devices as they relied on hover states.)
I have made a little bit of progress fiddling with ul.dropdown ul {top: -100%; }
but this only moves the dropdown up one 'row', I am not convinced that's semantic css.
Any ideas how I could achieve this ?
I have made a jsfiddle of the problem here - /
I am trying to implement a drop up menu. As a starting point I am using an existing drop down menu built using HTML/CSS/jQuery based on CSS trick's Simple jQuery Dropdowns. (As I couldn't get a pure css one to work on touch devices as they relied on hover states.)
I have made a little bit of progress fiddling with ul.dropdown ul {top: -100%; }
but this only moves the dropdown up one 'row', I am not convinced that's semantic css.
Any ideas how I could achieve this ?
I have made a jsfiddle of the problem here - http://jsfiddle/TTTb6/
Share Improve this question edited Sep 16, 2015 at 20:19 adrien54 1,6401 gold badge26 silver badges32 bronze badges asked Apr 26, 2013 at 16:13 samsam 10.2k40 gold badges114 silver badges167 bronze badges3 Answers
Reset to default 4Try changing this:
ul.dropdown ul {
bottom: 100%;
}
Updted jsfiddle
Instead of top
, use bottom: 100%;
:
ul.dropdown ul {
position: absolute;
bottom: 100%;
}
For touch devices you need to write code in click event. please check this one here you will get your answer...
Click to close jQuery dropdown menu on mobile devices while retaining other behavior
本文标签: javascriptMaking DropDown menu 39DropUp39Stack Overflow
版权声明:本文标题:javascript - Making DropDown menu 'DropUp' - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745328431a2653699.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论