Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS css3属性transition 不生效 #3345

Open
guoxi1994 opened this issue Aug 26, 2024 · 2 comments
Open

IOS css3属性transition 不生效 #3345

guoxi1994 opened this issue Aug 26, 2024 · 2 comments

Comments

@guoxi1994
Copy link

   <div ref="an1" class="scene-head" :class="[isTurnOnAnimate && 'isTurnOnAnimate']" :style="{ height: imgHeight + 'px' }">
      <image
        ref="an2"
        class="scene-head-image"
        :class="[isTurnOnAnimate && 'isTurnOnAnimate']"
        :style="{ transform: `scale(${scaleMultiple})`, height: imgHeight + 'px' }"
        :src="scene.picUrl"
        placeholder="./assets/image/home/ad-default.png"
      />
      <div class="scene-head-linear"></div>
      <div class="scene-head-con">
        <text class="scene-name"></text>
        <text class="scene-desc"></text>
      </div>
    </div>

.isTurnOnAnimate {
transition: height,transform 0.5s ease-in-out;
}

@firekyrin
Copy link

firekyrin commented Aug 26, 2024 via email

@guoxi1994
Copy link
Author

来信收悉,非常感谢!============http://www.firekyrin.com

animation.transition(this.$refs.an1, {
styles: {
height: 508
},
duration: 500, //ms
timingFunction: 'linear',
needLayout: true,
delay: 0 //ms
})
用这种方式可以实现回弹动画,但是会导致另外一个问题!先执行完动画,布局再改变(给人一个跳动的感觉),应该是needLayout没有生效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants