Nik*_*las 30 html css alignment progress-bar
我试图在我的网页屏幕底部放一个灰色条,无论分辨率如何.但是,当我尝试时,当我进入不同的分辨率时,它似乎只是上升或下降.有没有什么办法解决这一问题?
此外,条形码使用divid标签由CSS构成.
/* HTML*/
<div id="info">Scroll for info</div>
/* CSS */
<style>
#info {
height: 40px;
position: relative;
margin-top: 25%;
background-color: #393838;
opacity:
}
</style>
Run Code Online (Sandbox Code Playgroud)
编辑:我希望它在屏幕的底部,但是当我向下滚动时,它向上移动到我的屏幕顶部.
put*_*nde 50
如果你想要它在底部并且总是在底部,你必须使用position: fixed.你可以试试这个:
#info {
height: 40px;
position: fixed;
bottom:0%;
width:100%;
background-color: #393838;
opacity: 1;
}
Run Code Online (Sandbox Code Playgroud)