如何解决如何创建覆盖整个页面的垂直列?
出于设计目的,我需要一个覆盖整个页面的列(垂直);就像永无止境的支柱,即使我滚动也可以伸展。这就是我收集的。
#HTML
<div class = "container left-bar col-sm-1">
<div class ="row" id="left-bar-row">
testing
</div>
</div>
#css代码
max-height: 100%;
height: 100%;
min-height:100%;
margin: 0;
padding: 0;
float:left;
display: inline;
任何帮助将不胜感激。
解决方法
.left-bar {
position: fixed; /* keep the element in place even if you are scrolling*/
height: 100vh; /* to have the page height*/
width: 100px; /* you can set a width for leftbar*/
background: red;
}
<div class = "container left-bar col-sm-1">
<div class ="row" id="left-bar-row">
testing
</div>
</div>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。