简体   繁体   English

为什么标头转换在chrome和firefox中有效,但在edge中却无效?

[英]Why is header transition working in chrome and firefox, but not in edge?

Im currently building this project for some pals. 我目前正在为一些朋友建立这个项目。 However, the transition that I use to move the whole page to the left, when the menubutton is clicked. 但是,单击菜单按钮时,我用于将整个页面向左移动的过渡。 This animation does work in chrome and Firefox but not in edge. 此动画在chrome和Firefox中确实有效,但在Edge中无效。 Why is this? 为什么是这样?

header HTML: 标头HTML:

<div id="page" class="">
    <div class="wow fadeIn" data-wow-duration="1s">
        <header class="fixed topheader">
            <div class="leftheader toplist">
                <a id="logo" href="#">23-RuleZ</a>
            </div>
            <nav id="navbar" >
                <ul class="menulist nav">
                    <li class="menuitem topitem"><a href="#Join" class="toplist">Join 23-RuleZ</a></li>
                    <li class="menuitem topitem"><a href="#blog" class="toplist">Blog</a></li>
                    <li class="menuitem topitem"><a href="clanwar/" class="toplist">Clanwar</a></li>
                    <li class="menubutton topitem"><a  id="sidemenu" class="topbutton" href="javascript:void(0)">  &#9776; </a></li>
                </ul>
            </nav>
        </header>

Some JS: 一些JS:

  var a = document.getElementById("sidemenu");
  a.onclick = function() {
        if ($('#page').hasClass('moved')){
            $('header').removeClass('moved');
        }
        else {
            $('header').addClass('moved');
        }
        $('#page').toggleClass('moved');
        $('.sidebar').toggleClass('visible');
        $('#sidemenu').toggleClass('error redbottom');
    return false;
  }
}

CSS: CSS:

.bodyheader {
    background-color: #efefef;
    height: 60px;
    border-bottom: 3px solid #CCC;
        transition: all 0.5s ease;
      -moz-transition: all 0.5s ease;    /* FF3.7+ */
      -o-transition: all 0.5s ease;      /* Opera 10.5 */
      -webkit-transition: all 0.5s ease; /* Saf3.2+, Chrome */

}

.topheader {
    height: 80px;
    color: #FFF;
    font-weight:700;
    font-size:20px;
    border-bottom: 1px solid #666;
    transition: all 0.5s ease;
      -moz-transition: all 0.5s ease;    /* FF3.7+ */
      -o-transition: all 0.5s ease;      /* Opera 10.5 */
      -webkit-transition: all 0.5s ease; /* Saf3.2+, Chrome */

}

All code is available at the site. 所有代码都可以在该站点上获得。

Any help is appreciated! 任何帮助表示赞赏!

EDIT: What would be superb, is that the width changing of the page of the page is animatable. 编辑:什么是一流的,是页面的页面的宽度变化是可动画的。 I could get this to work previously. 我可以让它以前工作。

Edge是一个相当新的浏览器,因此可能需要一段时间才能支持所有HTML / CSS / JS,这归咎于浏览器。

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

相关问题 JavaScript适用于IE和Edge,但不适用于Chrome和Firefox - JavaScript working on IE and Edge but not working on Chrome and Firefox JavaScript 在 Firefox、Chrome 中不起作用 - 在 IE、Edge 中有效 - JavaScript not working in Firefox, Chrome - works in IE, Edge Bootstrap 4 - 模态。 在 Edge 中工作,而不是在 Chrome 或 Firefox 中工作 - Bootstrap 4 - Modal. Working in Edge, not in Chrome or Firefox 单击事件适用于Chrome和Edge,但不适用于Firefox - Click event working in chrome and edge but not in firefox Javascript 在 Edge 中不起作用,但在 Firefox、Chrome 中很好 - Javascript not working in edge, but fine in Firefox, Chrome 为什么 body.scrollTop 不适用于 Google chrome 和 Firefox,但适用于 Microsoft Edge - Why body.scrollTop is not working on Google chrome and Firefox but working on Microsoft edge 为什么关键帧在Firefox上有效,但在Chrome上却无效? - Why is keyframes working on Firefox but not on Chrome? 为什么在Safari和Firefox上不能使用此功能,而在Chrome上却不能使用? - Why is this working on Safari and Firefox but not on Chrome? 为什么画布可以在Chrome中工作,但不能在Firefox中工作? - Why is canvas working in chrome, but not firefox? Ajax脚本仅适用于Firefox(不适用于Chrome,Safari,Edge等) - Ajax script only working in Firefox (not working in Chrome, Safari, Edge,…)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM