级联样式表 [英] Cascading Style Sheet
本文介绍了级联样式表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在页面底部对齐按钮(必须始终在页面底部)?
在此先感谢..:)
How do I align a button at the bottom of a page (it must always be at the bottom of page)?
Thanks in advance.. :)
推荐答案
如果我没记错的话,类似:
创建一个CSS类,如下所示:
.button: position: absolute; bottom: 1px;
将此按钮附加到按钮上.
现在您想将它居中;这将起作用.将按钮包裹在div中,如下所示:
If I remember correctly, something like:
Create a css class as:
.button: position: absolute; bottom: 1px;
attach this to the button.
And now you want to center it; this will work. Wrap the button in a div like so:
<div id="divCenter"><input type="button" value="Button" /></div>
将CSS更改为:
Change the css to:
div#divCenter { position: absolute; bottom: 1px; text-align: center; width: 100%; }
这篇关于级联样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文