Internet Explorer keeps a tiny, whiney vertical ga

2019-07-27 08:29发布

问题:

I asked about the vertical gap causing mouseout on slow pointer movement and the issue got resolved (two separate approaches). However, I noticed that the corrected behavior only applies to FF and Cr, while IE still keeps a tiny vertical gap. It got much tinier, which is good, but it's still there.

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

See this fiddle and compare the behavior between browsers for details.

How can I make IE behave like the other children in the class?

回答1:

IE doesn't understand the initial value of the margin-top:

You can use auto instead:

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

Here is a fork of your jsfiddle:
https://jsfiddle.net/0a67pyd2/4/

Checked in chrome/firefox/ie.