Q
页脚按钮固定?
0
A
回答
0
添加position: fixed; bottom: 0;
,并删除top:0;
,底部属性设置元素的底部边缘。
试试这个代码:
#buton{text-align:right;
height: 100px;
width: 100%;
z-index: 100;
position: fixed;
bottom: 0;
}
0
删除
top:0
,并设置
bottom:0; position: fixed; right: 0;
#buton {
text-align: right;
height: 100px;
width: 100%;
z-index: 100;
position: fixed;
bottom: 0;
right: 0;
}
+0
0
问题是与top:0;
既然你需要的按钮固定停留在页面的右下角,你应该使用bottom: 0;position: fixed;
更新以下部分
#buton{
text-align:right;
height: 100px;
top: 0;
width: 100%;
z-index: 100;
}
以下给出的,
#buton{
text-align:right;
height: 100px;
bottom:0;
position: fixed;
width: 100%;
z-index: 100;
}
它会像魅力一样工作。
已经取得了一些变化,看到了演示..
UPDATE: See demo
0
包裹一切在
container
,并给它的位置relative
使
#buton
absolute
与bottom:0
保持
myButton
独立于任何位置的
html,body{
height:100%; /* important */
}
#conatiner {
position: relative;/* added*/
height:100%;/* important */
}
#buton {
text-align:right;
width: 100%;
z-index: 100;
position: absolute;/* added*/
bottom: 0;
}
相关问题
- 1. gridview固定页眉和固定页脚
- 2. JQM提交按钮上的固定页脚
- 3. 固定的Facebook页面Like按钮
- 4. TouchListview固定页脚
- 5. 页脚按钮
- 6. 固定页眉和页脚
- 7. 带固定页脚的固定侧栏
- 8. 在UIView页脚中添加按钮,其中脚注是固定的
- 9. 页脚底部的固定页脚
- 10. 固定按钮的大小按钮
- 11. 申请固定粘页脚
- 12. 固定页脚高度
- 13. React原生固定页脚
- 14. 标题固定为页脚
- 15. Android RecyclerView固定页脚
- 16. JQM固定页脚“浮动”
- 17. Bootstrap中的固定页脚
- 18. Bootstrap固定页脚移动
- 19. 按钮固定位置
- 20. html中的固定按钮
- 21. 固定大小的按钮
- 22. 固定滚动按钮
- 23. 固定按钮位置
- 24. 表 - 按钮大小固定
- 25. 固定下拉按钮HTML
- 26. Android布局(固定页眉+滚动部分+固定页脚)
- 27. VideoJS后框播放按钮在触摸模式和固定页脚后触发
- 28. 页眉和页脚使固定
- 29. 二固定件(页眉和页脚)
- 30. 固定页眉和页脚与ncurses?
莫名其妙地好,它遵循滚动,但它不是定位在角落里。 – Silviu
http://jsfiddle.net/manojmcet/Fvn7J/1/ – Manoj
Manoj,这很好,但他们固定在
。我怎样才能让它们变得更低? – Silviu