【IT专家】放置在CSS下拉菜单中时,HTML select会丢失文档流吗?

  • 格式:pdf
  • 大小:234.83 KB
  • 文档页数:2

本文由我司收集整编,推荐下载,如有疑问,请与我司联系放置在CSS下拉菜单中时,HTML select会丢失文档流吗?
放置在CSS下拉菜单中时,HTML select会丢失文档流吗?[英]Does an HTML select lose document flow when placed inside a CSS drop menu? Okay, that question definitely will create confusion, but it’s the only way I can think to ask it.
 好的,这个问题肯定会造成混乱,但这是我能想到的唯一方法。

Here’s the gist of what’s occurring. I have this menu: EDIT: here’s the requested fiddle (NOTE: you have to view this in IE8 in order to replicate the issue) fiddle
 这是正在发生的事情的要点。

我有这个菜单:编辑:这是请求的小提琴(注意:你必须在IE8中查看这个以便复制问题)小提琴
 ul a href=“#” Sort /a li link 1 /li li link 2 /li /ul /li a href=“#” Filter /a div select option option 1 /option option option 2 /option /select /div /li /ul /li
I’m using this CSS to style it and create the drop down functionality:
 我正在使用这个CSS来设置它并创建下拉功能:
 ul { position: relative; padding: 1em; background-color: #eeeeee; border: 1px solid #333333;ul li { display: inline;ul li a { color: #666666; margin-left: 1em; padding: 1em;ul li:hover a { color: #111111;ul li ul { position: absolute; padding: 1em; background-color: #cccccc; border: 1px solid #666666; display: none;ul li:hover ul { display: block;ul li ul li { display: block; When I hover over the sort menu, it displays, and I’m able to click a link. However, when I hover over the filter menu, it displays the drop down, I can move my mouse around within the drop down fine, but when I click the select box to open it and I move my mouse inside to select and option, the whole drop down menu disappears. It’s as if the select box isn’t actually contained within the UL drop down.
 当我将鼠标悬停在排序菜单上时,它会显示,然后我就可以点击链接了。

但是,当我
将鼠标悬停在过滤器菜单上时,它会显示下拉菜单,我可以在下拉菜单中移动我的鼠标,但是当我单击选择框打开它并将鼠标移动到选择和选项时,整个下拉菜单消失。

就好像选择框实际上不包含在UL下拉列表中。