标题中的jQuery Mobile下拉菜单不起作用
我在jQuery移动页面的标题中创建了自己的下拉菜单:标题中的jQuery Mobile下拉菜单不起作用,jquery,html,css,jquery-mobile,Jquery,Html,Css,Jquery Mobile,我在jQuery移动页面的标题中创建了自己的下拉菜单: <div data-role="header"> <ul id="menu"> <li><a href="#" data-role="button" data-icon="gear" data-rel="dialog">Menu</a> <ul> <li><a href="
<div data-role="header">
<ul id="menu">
<li><a href="#" data-role="button" data-icon="gear" data-rel="dialog">Menu</a>
<ul>
<li><a href="">Forgot to accept</a></li>
<li><a href="">Remove me from group</a></li>
</ul>
</li>
</ul>
<h1><?php echo $group_data['name']; ?></h1>
...
即使使用的是
position:absolute
,也需要设置位置
#menu ul {
position: absolute;
top: 0;
left: 0;
...
}
只是试过了,不是这样。content div仍然覆盖菜单并将其置于其下:/I我以为您刚才说定位已关闭。尝试将
z-index:5
添加到#菜单ul
以强制将其显示在内容div的顶部。您得到答案了吗?
#menu ul {
position: absolute;
top: 0;
left: 0;
...
}