Bootstrap 4 IE 11不起作用

Lis*_*isa 13 css internet-explorer sass internet-explorer-11 twitter-bootstrap-4

所以我有问题,我的整个网站在IE 11中不起作用.我不明白为什么因为官方IE 11应该由bootstrap 4支持...网站:www.ergotherapie-klinkicht.de我有点现在无助,因为我不知道从哪里开始.在我的代码中,我错过了IE 11的内容吗?

在Firefox,Edge,Chrome和Safari中它运行得很好......

因为现在,我觉得bootstrap 4根本不兼容IE 11 ...

谢谢你的回复!

这是我的导航栏,例如,它在IE 11中不可见:

#logonav {

   height: 40px; 
    width: auto;
}

/* change the link color */
.navbar-custom .navbar-nav .nav-link {
    color: #2E8B57;
}
/* change the color of active or hovered links */
.navbar-custom .nav-item .nav-link .active,
.navbar-custom .nav-item:hover .nav-link {
    color: orangered; 
}

/* change the brand and text color */
.navbar-custom .navbar-brand,
.navbar-custom .navbar-text {
    color: #2E8B57;
}

.custom-toggler.navbar-toggler {
    border-color: rgb(46,139,87);
}
.custom-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(46, 139, 87, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");

}

<!DOCTYPE html>
<html lang="de">

<head>
    <meta charset="UTF-8">
    <!-- IE Edge Meta Tag -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Viewport -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <!-- Minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
        crossorigin="anonymous">
    <link rel="stylesheet" href="ergo.css">
    <title>Bettina Klinkicht Ergotherapeutische Praxis Bonn</title>
    <link rel="shortcut icon" type="image/x-icon" class="img-circle" href="logopur.png">
    <!-- Global Site Tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-107069424-1"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag() { dataLayer.push(arguments) };
        gtag('js', new Date());

        gtag('config', 'UA-107069424-1');
    </script>
</head>
<body>
 <nav class="navbar navbar-inverse fixed-top transparent navbar-toggleable-sm navbar-custom">
        <div class="navbar-inner">
            <!-- Brand and toggle grouped for better mobile display -->
            <button class="navbar-toggler navbar-toggler-right custom-toggler" type="button" data-toggle="collapse" data-target="#navmobile"
                aria-controls="navmobile" aria-expanded="false" aria-label="Toggle Navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

            <a href="home.html" class="navbar-brand"><img src="logopur_neu.png" alt="Logo" id="logonav"></a>
        </div>
        <!-- Collect nav-links for toggling-->
        <div class="collapse navbar-collapse" id="navmobile">
            <div class="navbar-nav ml-auto">
                <a class="nav-item nav-link active" href="#">Home</a>
                <a class="nav-item nav-link" href="Therapeutin.html">Über mich</a>

                <div class="dropdown">
                    <a class="nav-item nav-link dropdown-toggle" href="#" data-toggle="dropdown" id="servicesDropdown" aria-haspopup="true" aria-expanded="false">Angebot</a>
                    <div class="dropdown-menu" aria-labelledby="servicesDropdown">
                        <a class="dropdown-item" href="Geriatrie.html">Geriatrie</a>
                        <a class="dropdown-item" href="Neurologie.html">Neurologie</a>
                        <a class="dropdown-item" href="Spiegeltherapie.html">Spiegeltherapie</a>
                        <a class="dropdown-item" href="Schwindeltherapie.html">Schwindeltherapie</a>
                        <a class="dropdown-item" href="Biographiearbeit.html">Biographiearbeit</a>
                        <a class="dropdown-item" href="Brain_Gym.html">Brain Gym</a>
                        <a class="dropdown-item" href="Sensibilitaetstraining.html">Sensibilitätstraining</a>
                        <a class="dropdown-item" href="Gleichgewichtstraining.html">Gleichgewichtstraining</a>
                    </div>
                </div>

                <a class="nav-item nav-link" href="Kontakt.html">Kontakt</a>
            </div>
        </div>
        </div>
        </div>
    </nav>
        <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n"
        crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb"
        crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
        crossorigin="anonymous"></script>
    <script src="ergo.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

Cav*_*man 27

发布以防万一这可以帮助别人.我遇到了同样的问题,一切都在Chrome中运行得很好,但在IE11中它表现得好像看不到任何CSS.我遇到过这篇文章,但没有帮助.经过更多的搜索,我发现了一个建议,在HEAD标签中添加以下内容并且它有效.想我会发布在这里,因为这是谷歌搜索中出现的第一个线程之一.

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Run Code Online (Sandbox Code Playgroud)

  • 只是验证了诀窍.我在一个新的Bootstrap 4网站上做了一堆开发,然后在IE11中进行了测试,看起来很糟糕.这个元素立即解决了这个问题. (3认同)

小智 4

在 IE 中,高度和宽度需要显式设置,否则会破坏。

所以这width: auto可能会引起问题。auto给我带来了很多问题。也许尝试一下