你好,我有一个像这样的meta标签
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalabale=no, width=device-width, height=device-height" />
现在我可以使用JavaScript获取视口的高度,我想使用它来修改我的页脚,使其始终保持在屏幕底部,可以使用固定定位。以下是页脚的CSS代码:
#footer
{
height:30px;
background-color:#D9D9D9;
background-image:url(../images/footer.png);
background-repeat:repeat-x;
margin-top:20px;
width:100%;
/*bottom:0;
position:fixed;*/
}
我该如何使用JS修改页脚以得到正确的结果?谢谢。@cyberomin。