1、所有外层元素都使用fixed布局,如:
<header style="position:fixed"></header>
<article style="position:fixed"></article>
<footer style="position:fixed"></footer>
2、使用absolute定位,并使用javascript动态改变层的位置
3、在有输入框输入的时候,隐藏fixed层或设计为relative
时间:2026-02-12 00:58:55
1、所有外层元素都使用fixed布局,如:
<header style="position:fixed"></header>
<article style="position:fixed"></article>
<footer style="position:fixed"></footer>
2、使用absolute定位,并使用javascript动态改变层的位置
3、在有输入框输入的时候,隐藏fixed层或设计为relative