css - 当指针缓慢移动时,Internet Explorer 会保留一个微小的垂直间隙,导致鼠标悬停

标签 css twitter-bootstrap internet-explorer firefox bootstrap-4

我问了about the vertical gap causing mouseout on slow pointer movement问题得到解决(两种不同的方法)。但是,我注意到更正后的行为仅适用于 FF 和 Cr,而 IE 仍保持微小的垂直间隙。它变得更小了,这很好,但它仍然存在。

.open > .dropdown-menu {
  margin-top: initial;
}

参见 this fiddle并比较浏览器之间的行为以获取详细信息。

我怎样才能让 IE 表现得像类其他 child 一样?

最佳答案

IE 不理解 margin-topinitial 值:

enter image description here

您可以改用auto:

.open>.dropdown-menu{
    margin-top: auto;
}

这是你的 jsfiddle 的一个分支:
https://jsfiddle.net/0a67pyd2/4/

在 chrome/firefox/ie 中检查。

关于css - 当指针缓慢移动时,Internet Explorer 会保留一个微小的垂直间隙,导致鼠标悬停,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41322119/

相关文章:

html - 具有内联 block 子项的 div 与相同的 CSS 显示不一致

CSS 背景图像不在移动设备上滚动

button_to 的 HTML 内容

javascript - htmlCollection child 不在 IE 中工作

包含 if 和 .each() 的 jQuery 函数在 IE7 中非常慢

html - 带有居中文本(垂直和水平)的圆形链接和事件区域只有圆形,而不是方形

html - 谨慎创建外部站点代码

javascript - Internet Explorer 9 及以下版本,在主体上使用 rtl 方向时将滚动条设置为右侧

javascript - 如何用按钮制作标题标题

css - Spring Boot 不加载 css 文件 : Request method 'GET' not supported