如代码所示,从另一个页面进入page has fixed footer 会有闪烁,布局不会像预期一样展示。
vue-router issuseUn-fixing Fixed Elements with CSS Transforms
文章中指出transformed element会为所有子元素创建一个containing block,一个在这个containing block下fixed的元素也是一个transformed element,如果这种transformed element在正常文档流中,它会跟着文档滚动,fixed position子元素会跟着transformed element滚动
...where things got really troublesome for me: a transformed element creates a containing block even for descendants that have been set to position: fixed. In other words, the containing block for a fixed-position descendant of a transformed element is the transformed element, not the viewport. Furthermore, if the transformed element is in the normal flow, it will scroll with the document and the fixed-position descendants will scroll with it.
如代码所示,从另一个页面进入
page has fixed footer
会有闪烁,布局不会像预期一样展示。 vue-router issuse Un-fixing Fixed Elements with CSS Transforms 文章中指出transformed element
会为所有子元素创建一个containing block
,一个在这个containing block
下fixed
的元素也是一个transformed element
,如果这种transformed element
在正常文档流中,它会跟着文档滚动,fixed position
子元素会跟着transformed element
滚动issuse作者在评论中留下了一种结局方案,但是我这边内嵌了两三层
transition
,改动代价太大,换了一个种布局结构