Ano*_*us1 9 modal-dialog twitter-bootstrap
I'm trying to center a waiting screen modal dialog in the middle of the screen. Here is the modal dialog I'm trying to alter: http://dotnetspeak.com/2013/05/creating-simple-please-wait-dialog-with-twitter-bootstrap. How do I center it horizontally and vertically?
cra*_*att 16
这只是将一些CSS应用于pleaseWaitDialog
ID的问题.你必须设置position:absolute
和,margin-top
并且margin-left
需要是高度和宽度的一半.所以你的CSS应该是这样的:
#pleaseWaitDialog {
width: 400px;
height: 50px;
position: absolute;
top: 50%;
left: 50%;
margin-top: -25px;
margin-left: -200px;
padding: 20px;
}
Run Code Online (Sandbox Code Playgroud)
你需要玩这些数字才能达到你想要的盒子大小,但这应该可以让你开始.
归档时间: |
|
查看次数: |
74069 次 |
最近记录: |