div中如何把图片始终悬浮(固定)在页面窗口底部或顶部
页面底部:
css代码:
.divClass {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 20px;
background-color: #FFC0CB;
}
页面顶部
css代码:
.divClass {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 20px;
background-color: cornflowerblue;
}
还没有评论,来说两句吧...