[英]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)"> ☰ </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.