Starter 要做什麼
先看見缺口,再完成一個小修改。
本主題檔案:files/style.css
定位:由 sticky 元素往上找第一個 overflow 非 visible 的祖先。
Starter · code-edit
先看見缺口,再完成一個小修改。
先看見缺口,再完成一個小修改。
本主題檔案:files/style.css
定位:由 sticky 元素往上找第一個 overflow 非 visible 的祖先。
頁面不會替你修改檔案;請在實作檔完成後重新整理確認。
面板可局部捲動;標題 position:static,尚未套 top:0 sticky。
computed position 由 static 變 sticky;scrollTop 增加後 sticky top 留在 container top 附近且不超出祖先範圍。
.scroll-panel{overflow:auto;max-height:12rem}.panel-title{position:sticky;top:0}只在本階段資料夾內操作,避免改到其他章節。
index.htmlstyle.css證據:現有 runtime before=static、after=sticky;required facts 包含 scrollTop、targetTop、containerTop
前往 Checkpoint →