CSS如何把DIV永远置于页面的底部?
答案:1 悬赏:0 手机版
解决时间 2021-03-30 03:21
- 提问者网友:感性作祟
- 2021-03-29 03:38
CSS如何把DIV永远置于页面的底部?
最佳答案
- 五星知识达人网友:拜訪者
- 2021-03-29 04:28
不知道你说的永远在底部是不是那种无论滚动条怎么拉,都可以看见悬浮在底部的那种,如果是那种,是用固定定位做的。另外注意页面中最后的元素或者body要空出固定条的高度,不然最后的元素会被遮挡。
html:
固定在底部
css:
body{ padding-bottom:50px;}
.fixed{ position:fixed; left:0px; bottom:0px; width:100%; height:50px; background-color:#000; z-index:9999;}
html:
固定在底部
css:
body{ padding-bottom:50px;}
.fixed{ position:fixed; left:0px; bottom:0px; width:100%; height:50px; background-color:#000; z-index:9999;}
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯