ac1*_*c12 7 html css drop-down-menu
在<select><option>foo</option></select>下拉太接近页面的底部.我希望下拉菜单"下降".我一直在搜索,但只能提取导航菜单上的信息.我尝试给出<select class="select-store">一个顶部:100%和底部:100%是位置:绝对这是我看到的导航菜单下拉到"下拉"没有占上风.这可能吗?提前谢谢你们,代码如下;
HTML
<select class="select-store" onchange="document.location.href=this.value">
<option value="/">Store Finder</option>
<option value="/foo">foo</option>
<option value="/beta">beta</option>
</select>
Run Code Online (Sandbox Code Playgroud)
CSS
#finder .select-store{
background: url("/images/storefinder_bg.png") no-repeat scroll 0 0 transparent;
border: medium none;
color: #5B5A5A;
font-family: UNIV-C,Arial,Helvetica,sans-serif;
font-size: 16px;
font-weight: normal;
height: 32px;
line-height: 16px;
padding: 3px;
vertical-align: middle;
width: 186px;
}
Run Code Online (Sandbox Code Playgroud)
SELECT元素行为由浏览器决定.它只能检测视口外部的溢出,有时会重新定位列表.你不能直接控制它.
现在,如果您使用基于脚本的模拟SELECT,则可以检测JS代码中的溢出并相应地重新定位.
| 归档时间: |
|
| 查看次数: |
9253 次 |
| 最近记录: |