我注意到在最新的Safari 11.1中(在Chrome和Firefox中运行良好),当在另一个包含translate3d
转换的元素中应用时,屏幕上会消失translate3d
转换的元素
此处复制: https://jsfiddle.net/chq2qfm8/66/
答案 0 :(得分:2)
看起来Safari是新的IE,但你可以使用paste0("\\scriptsize", "770")
,这是" 3d"太:
更新作为PO"也可能有X移动"我也添加了translateY
组件。
X

init();
function init() {
bindEvents();
}
function bindEvents() {
document.querySelector('.scrollUp').addEventListener('click', scrollUp, false);
document.querySelector('.scrollDown').addEventListener('click', scrollDown, false);
}
function scrollDown() {
document.querySelector('.panels')
.style.transform = 'translateX(100px) translateY(-' + window.innerHeight + 'px)';
document.querySelector('.panel1 .panel-bg')
.style.transform = 'translateX(100px) translateY(-20px)';
document.querySelector('.panel2 .panel-bg')
.style.transform = 'translateX(-100px) translateY(-20px)';
}
function scrollUp() {
document.querySelector('.panels')
.style.transform = 'translateX(0) translateY(0)';
document.querySelector('.panel1 .panel-bg')
.style.transform = 'translateX(-100px) translateY(-20px)';
document.querySelector('.panel2 .panel-bg')
.style.transform = 'translateX(100px) translateY(-20px)';
}

html,
body {
overflow: hidden;
height: 100%;
padding: 0;
margin: 0;
color: red;
font-weight: bold;
}
.panels {
position: relative;
width: 100%;
height: 100%;
transition: all 1000ms ease;
}
.panel,
.panel-bg {
width: 100%;
height: 100%;
}
.panel-bg {
background-image: url(https://www.w3schools.com/howto/img_fjords.jpg);
background-size: cover;
transition: transform 700ms ease;
}
.panel2 .panel-bg {
background-image: url('https://camo.mybb.com/e01de90be6012adc1b1701dba899491a9348ae79/687474703a2f2f7777772e6a71756572797363726970742e6e65742f696d616765732f53696d706c6573742d526573706f6e736976652d6a51756572792d496d6167652d4c69676874626f782d506c7567696e2d73696d706c652d6c69676874626f782e6a7067');
}
.panel {
overflow: hidden;
}
.panel-bg {
top: 0;
left: 0;
width: 100%;
}
.actions {
position: fixed;
z-index: 777;
left: 20px;
top: 20px;
}
.acions button {
display: inline-block;
}

答案 1 :(得分:0)
"强制硬件加速似乎解决了问题"