[Browser] 在渲染(render)時,已知IE11與chrome不一致的地方

 

此文章列出已知IE11與chrome不一致的地方,

會較偏向是IE11自身問題,之後有新發現會再新增列出。

 

一、在 display:flex; 之下 margin-top:auto; 與 margin-bottom:auto; 失效

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">

    <style>
        .container {
            height: 100vh;
            display: flex;
        }

        .mt-auto {
            margin-top: auto;
        }

        .mb-auto {
            margin-bottom: auto;
        }

        div {
            border: 1px red solid;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="mt-auto mb-auto">
            <h1>Hello, world!</h1>
            <h1>Hello, world!</h1>
        </div>
    </div>
</body>
</html>

 

二、flex-wrap無作用,無法wrap

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <style type="text/css">
        .row {
            display: flex;
            flex-wrap: wrap;
        }
        .col {
            flex-basis: 0;
            flex-grow: 1;
        }
        .text-center {
            text-align: center !important;
        }
        h3 {
            width: 200px;
        }
        div {
            border: 1px red solid;
        }
    </style>
</head>
<body>
    <section class="row">
        <div class="col text-center"><h3>畢業學生</h3></div>
        <div class="col text-center"><h3>畢業學生推動時代的巨輪</h3></div>
    </section>
</body>
</html>