【问题标题】:Microsoft Edge displays the background above the other elementsMicrosoft Edge 在其他元素上方显示背景
【发布时间】:2016-08-03 03:40:46
【问题描述】:

我正在尝试解决此网站上的问题。 (http://www.yunke.es)

在 IE(10、11)和(Chome、Firefox 等)中工作正常,但在 Edge 中,不同部分的背景隐藏在整个网络中,并且无法访问我所做的内容(文本和图像)测试更改 Css 属性...例如“位置”,但效果不佳。有什么想法吗?

#backgrounds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-transition: -webkit-transform .6s ease-out;
    -moz-transition: -moz-transform .6s ease-out;
    -ms-transition: -ms-transform .6s ease-out;
    -o-transition: -o-transform .6s ease-out;
    transition: transform .6s ease-out;
    background: url(../img/loader.gif) no-repeat center center #000;
}

#contents, #layer-1, #layer-2 {
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-transition: -webkit-transform .6s ease-out;
    -moz-transition: -moz-transform .6s ease-out;
    -ms-transition: -ms-transform .6s ease-out;
    -o-transition: -o-transform .6s ease-out;
    transition: transform .6s ease-out;
}
<div id="backgrounds" style="transform: translate3d(0px, 0px, 0px);">
	<article class="item-0" style="height: 773px;"></article>
	<article class="item-1" style="height: 773px; background-position: 0px 0px;"></article>
	<article class="item-2" style="height: 1161px;"></article>
	<article class="item-3" style="height: 773px;"></article>
	<article class="item-4" style="height: 773px;"></article>
	<article class="item-5" style="height: 773px;"></article>
	<article class="item-6" style="height: 2146px;"></article>
	<article class="item-7" style="height: 773px;"></article>
	<article class="item-8" style="height: 773px;"></article>
	<article class="item-9" style="height: 773px;"></article>
	<article class="item-10" style="height: 1040px;">
		<div class="crazy">
			<img src="http://yunke.es/assets/img/background-6-1.png" style="right: -442.013%;">
		</div>
	</article>
</div>

<div id="contents" style="transform: translate3d(0px, 0px, 0px); visibility: visible;">
	
	<article class="item-0" style="height: 927.6px;"></article>
	
	<article class="item-1" style="height: 927.6px;">
		<div class="mask" style="height: 773px; transform: translate3d(0px, -309.2px, 0px);">
			<img class="masked" src="http://yunke.es/assets/img/background-2-1.png" style="transform: translate3d(0px, 309.2px, 0px);">
		</div>
		<div class="mask" style="height: 773px; transform: translate3d(0px, -309.2px, 0px);">
			<img class="masked eyes-open" src="http://yunke.es/assets/img/background-2-2.png" style="visibility: hidden; transform: translate3d(0px, 309.2px, 0px);">
		</div>
	</article>
 </div>
	

【问题讨论】:

  • 如果您希望人们提供帮助,请分享 HTML/CSS。

标签: css microsoft-edge


【解决方案1】:

Microsoft Edge 似乎有一个使用像素单位的属性 translate3d 的错误。在“%”中转换“px”即可解决问题。

【讨论】:

  • 你是怎么得出这个结论的?如果您有减少,请考虑将其发布到bugs.microsoftedge.com
  • 我在一个项目中遇到了同样的问题,并使用“%”而不是 px 来修复它。我并不真正关心 Edge 的错误,因为我从未见过微软提供合适的浏览器 ;-)。 Edge 开发者必须自己测试他们的浏览器
  • 我是 Edge 团队的工程师;我们彻底测试。但我也会关注 Stack Overflow 以了解我们未涵盖的任何场景,以便我们可以随着时间的推移而改进。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-01-26
  • 2017-05-05
  • 1970-01-01
  • 1970-01-01
  • 2021-11-18
  • 1970-01-01
  • 2017-10-24
相关资源
最近更新 更多