简体   繁体   English

网站在旧版本的Internet Explorer中无法正确显示

[英]Site not displaying properly in old versions of Internet Explorer

I'm having a very hard time figuring out why my site won't display properly in old versions of IE. 我很难弄清楚为什么我的网站无法在IE的旧版本中正确显示。

You can view my demo site here 您可以在这里查看我的演示站点

I've attached screenshots showing how different IE versions display my site. 我已经附上了截图,显示了不同的IE版本如何显示我的网站。

To put it simply, the site contains one unordered list, which contains many different list items (represented by green boxes) There should only be 3 green boxes per row. 简单地说,该站点包含一个无序列表,其中包含许多不同的列表项(以绿色框表示)。每行应该只有3个绿色框。

In IE 8, the layout is totally wrong. 在IE 8中,布局完全错误。 The green boxes aren't displayed, and there is no structure to the page (see IE8 screenshot) 绿色框未显示,并且页面没有结构(请参阅IE8屏幕截图)

In IE9, the green boxes are displayed, but they do not line up properly (see IE9) 在IE9中,显示了绿色框,但它们未正确对齐(请参阅IE9)

In IE 10, it displays fine except the green navigation bar at the top is shown as a stack, as opposed to a horizontal row (this occurs in IE8/IE9 too). 在IE 10中,它显示正常,只是顶部的绿色导航栏显示为堆栈,而不是水平行(在IE8 / IE9中也是如此)。

In IE 11, it displays totally fine. 在IE 11中,它显示得很好。

The individual list item code is: 单个列表项代码为:

<li class="list__item2">
    <figure class="list__item__inner">
            <a class="divLink" href="http://www.ddd/Properties/Gammie/details.html">
    <p class="vignette" style="background-image:url(http://www.containermodularhouse.com/photo/pl728931-modern_prefab_bungalow_homes_angle_steel_frame_for_villa_and_small_house_wlh_bgl010.jpg)"></p>
    <div class="titlebox">Sample Title</div>
       <div class="locationbox">Sample Title</div>
     <div class="pricebox">Sample Title</div>
     </a>
    </li>

I'm using the FlexWrap webkit to align the boxes, it's script is: 我正在使用FlexWrap Webkit对齐框,其脚本是:

<script>

;( function( $, window, document, undefined )
{
    'use strict';

    var s = document.body || document.documentElement, s = s.style;
    if( s.webkitFlexWrap == '' || s.msFlexWrap == '' || s.flexWrap == '' ) return true;

    var $list       = $( '.list' ),
        $items      = $list.find( '.list__item__inner' ),
        setHeights  = function()
        {
            $items.css( 'height', 'auto' );

            var perRow = Math.floor( $list.width() / $items.width() );
            if( perRow == null || perRow < 2 ) return true;

            for( var i = 0, j = $items.length; i < j; i += perRow )
            {
                var maxHeight   = 0,
                    $row        = $items.slice( i, i + perRow );

                $row.each( function()
                {
                    var itemHeight = parseInt( $( this ).outerHeight() );
                    if ( itemHeight > maxHeight ) maxHeight = itemHeight;
                });
                $row.css( 'height', maxHeight );
            }
        };

    setHeights();
    $( window ).on( 'resize', setHeights );
    $list.find( 'img' ).on( 'load', setHeights );

})( jQuery, window, document );

</script>

The entire CSS is within the html code. 整个CSS在html代码内。 Viewing the page source can show you this. 查看页面源可以向您显示此内容。

How do I make my page appear in all IE versions properly (like in IE 11?) 如何使我的页面正确显示在所有IE版本中(例如IE 11?)

Thank you! 谢谢!

IE 8: IE 8: IE8

IE 9: IE 9: IE9

IE 10: IE 10: IE10

IE 11: IE 11: IE 11

You can try using Flexie which polyfills Flexbox. 您可以尝试使用Flexie,它可以填充Flexbox。 It enables the 2009 Flexbox model although it currently does not have polyfill for the new specification 尽管当前没有针对新规范的polyfill,但它启用了2009 Flexbox模型

https://github.com/doctyper/flexie https://github.com/doctyper/flexie

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

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