简体   繁体   English

仅在CSS / design,crossbrowser兼容性中使用IE的问题

[英]Issue with IE only in CSS/design, crossbrowser compatibility

This question is based on this JSFiddle . 这个问题是基于这个JSFiddle It is a navigation design with two top level menu items and three submenus (structured for accessibility without script). 它是一个导航设计,有两个顶级菜单项和三个子菜单(结构化为无脚本的可访问性)。 An element to look at may be: 要看的元素可能是:

     <nav class="top-menu">

There is one pressing issue: 有一个紧迫的问题:

  1. Just open the JSFiddle in Internet Explorer and see. 只需在Internet Explorer中打开JSFiddle即可。 Why does it drop down like that only in IE? 为什么它只在IE中下降? Even in IE9 and 10. 即使在IE9和10中也是如此。

Any help here will be greatly appreciated! 任何帮助将非常感谢!

I have noticed that "top-header" blocks had different heights, and to fix this I've added line-height CSS rule: 我注意到“top-header”块具有不同的高度,为了解决这个问题,我添加了行高CSS规则:

.top-header {
    padding: 0 0 5px 0;
    display: inline-block;
    margin-left: 20px;
    position: relative;
    + line-height: 28px; 
}

And it currently seems same for me in IE and Chrome. 在IE和Chrome中,它目前对我来说似乎相同。

Updated fiddle 更新了小提琴

add

height :136px \0/;

at the end of .top-header and the problem will be solved check jsfiddle .top -header的末尾,问题将解决,检查jsfiddle

You may use some 'tape' to fix this in IE. 您可以使用一些“磁带”在IE中修复此问题。 :) :)

Via CC, add a border-bottom: white 10px solid; 通过CC,添加border-bottom: white 10px solid; or outline:white 10px solid; outline:white 10px solid; http://jsfiddle.net/SKJvv/7/ http://jsfiddle.net/SKJvv/8/ http://jsfiddle.net/SKJvv/7/ http://jsfiddle.net/SKJvv/8/

It doesn't explain much what layout is playing about. 它没有解释布局正在播放的内容。

(CC included : http://jsfiddle.net/SKJvv/10/ ) (CC包括: http//jsfiddle.net/SKJvv/10/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM