html - IE <a> 元素 float left 由于某种原因首先移动

标签 html css internet-explorer

我有一些 <a>向左浮动的元素。由于某种原因,第一个元素在 IE10 中向上移动。 需要 float 它们,因为一些元素没有显示,否则 View 会变得很糟糕。

HTML

   <div id="Header-Links">
      <a id="Links-Start" href="#Start">Start</a>
      <a id="Links-Orders" href="#Orders" class="DisplayNone"></a>
      <a id="Links-References" href="#References"></a>
      <a id="Links-Account" href="#Account" class="DisplayNone"></a>
      <a id="Links-Customer" href="#Customer"></a>
      <a id="Links-Support" href="#Support"></a>
      <a id="Links-Impress" href="#Impress"></a>
   </div>

CSS

#Header-Links {
  top: 13px;
  left: 30px;
}

#Header-Links > a {
  text-decoration: none;
  float: left;
}

#Header-Links a + a:before {
  content: "|";
  margin-left: 7px;
  margin-right: 6px;
  font-weight: 900;
  text-decoration: none;
}

.DisplayNone {
   display: none;
}

谷歌浏览器
enter image description here

浏览器
enter image description here

最佳答案

某处元素的行高与第一个不同。

关于html - IE <a> 元素 float left 由于某种原因首先移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16983252/

相关文章:

jquery - 数据不会加载到 div 中

html - 翻转两个不同的图像并在悬停时停止

css - 我们如何使用 Vue 在 Laravel 中提取 CSS block 文件?

javascript - 使用 Javascript 打印 Div 并保留样式

internet-explorer - 找出谁在 IE 开发工具中覆盖了某个类

css - IE8 和 IE9 无法正确呈现 960 网格

javascript - 如何使用JavaScript显示Powerpoint PPT文件幻灯片动画

c# - 将 ID 号添加到 CSS 标签

CSS 虚线和斜 Angular 边框

CSS 展示图章效果在 IE 11 中不起作用