我正在尝试在 sidenav 中添加一个固定的文本区域(sidebar-dir-2)。此文本区域必须始终位于浏览器窗口的底部。我似乎无法做到这一点。每次我使用固定定位时,sidebar-dir-2 都会设置到浏览器屏幕的底部,但当我滚动时它会停留在屏幕中间。这是我的 HTML:
<div style="display:flex;flex-direction: column; flex-wrap: nowrap">
<md-toolbar class="md-blue-grey" >
<h1 class="md-toolbar-tools">
<span>Sidebar</span>
</h1>
</md-toolbar>
<sidebar-dir-1></sidebar-dir-1>
</div>
<sidebar-dir-2 style="position: fixed; bottom: 0"></sidebar-dir-2>
如有任何帮助,我们将不胜感激。
最佳答案
据我了解你想要的是不是和这个类似?
<style>
textarea{
position: fixed;
bottom: 0px;
left: 50%;
}
</style>
<textarea>Something</textarea>
关于html - 修复了 sidenav 中的页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30126652/