html - 修复了 sidenav 中的页脚

标签 html angularjs css flexbox

我正在尝试在 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/

相关文章:

javascript - 我的侧边导航折叠在 <form> 中不起作用

javascript - 相关链接在 HTML 页面上不起作用

javascript - 为什么输入没有改变颜色?

css - 在 Mac 上选择看起来像选择的 Windows

javascript - 带有 twitter bootstrap 的 CSS 布局

html - 我的代码为 "Uncaught SyntaxError: Unexpected token <"但现有代码在 javascript 中工作正常?

html - 如何去掉 slider 左右两侧不需要的空白区域?

javascript - Angularjs:找不到通过ajax调用从服务器获取的表单

javascript - Wrapping Foundation 4 在 Angular 中展示

html - Opera 和 IE8 - 主体下方的间隙