-
Notifications
You must be signed in to change notification settings - Fork 34
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
说说visibility=hidden, opacity=0,display:none的区别 #64
Labels
Comments
opacity=0该元素隐藏起来了,但不会改变页面布局,并且,如果该元素已经绑定一些事件,如click事件,那么点击该区域,也能触发点击事件的 visibility=hidden该元素隐藏起来了,但不会改变页面布局,但是不会触发该元素已经绑定的事件 display=none把元素隐藏起来,并且会改变页面布局,可以理解成在页面中把该元素删除掉一样。 |
结合重绘回流说一说? |
触发重排 reflow
触发回流 repaint
坐等大佬详解 |
reflow应该是回流, repaint应该是重绘 |
触发重绘(repaint): 触发回流(重排:reflow) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: