文本是抖动的,因为掩码是溢出的:隐藏,掩盖了文本元素。有什么线索吗?谢谢!
这应该在 Safari 中看到:
http://jsfiddle.net/38bqt7gv/8/
var wrapper = document.querySelector('.wrapper');
TweenMax.fromTo(wrapper, 2, {width: '0%'}, {width: '100%', repeat: -1, yoyo: true, repeatDelay:2})
.wrapper {
width: 0%;
position: fixed;
top: 0;
right: 0;
overflow: hidden;
height: 200px;
}
.text {
background-color: lightblue;
position: fixed;
top: 0;
left: 0;
text-align: center;
width: 100%;
height: 100%;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenMax.min.js"></script>
<div class="wrapper">
<div class="text">
<h1>Hello I am text</h1>
</div>
</div>
跳动,故障,抖动,表现