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

修复actionsheet蒙版不触发动画的bug #333

Merged
merged 1 commit into from
Apr 21, 2016
Merged

修复actionsheet蒙版不触发动画的bug #333

merged 1 commit into from
Apr 21, 2016

Conversation

sklme
Copy link
Contributor

@sklme sklme commented Apr 20, 2016

因为display属性不是有粒度的属性,所以当一个事件让display属性发生改变时,transition将不会触发。解决的办法是触发在切换display属性之后,强行触发一次页面的重排(reflow)。

所以使用foucus()在切换display之后触发一次reflow。

@mlyknown
Copy link

弱弱的问下 什么叫做有粒度的属性啊

@sklme
Copy link
Contributor Author

sklme commented Apr 22, 2016

@mlyknown 没有粒度在这里是指display只能是显示或者隐藏,没有中间的过渡,类似的属性还有visibility。

displaiy:none;removes a block from the page as if it were never there. A block cannot be partially displayed; it’s either there or it’s not. 引用自

@mlyknown
Copy link

@sklthegoodman thanks ~~

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

Successfully merging this pull request may close these issues.

3 participants