Add compatible css centered demo code, close #3849

This commit is contained in:
afc163 2016-11-15 15:02:30 +08:00
parent 1750fc754c
commit f9319e244b
2 changed files with 26 additions and 2 deletions

View File

@ -1,5 +1,6 @@
--- ---
order: 7 order: 7
debug: true
title: title:
zh-CN: 手动移除 zh-CN: 手动移除
en-US: Manual to destroy en-US: Manual to destroy

View File

@ -68,6 +68,28 @@ ReactDOM.render(<App />, mountNode);
````css ````css
/* use css to set position of modal */ /* use css to set position of modal */
.vertical-center-modal {
text-align: center;
white-space: nowrap;
}
.vertical-center-modal:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
width: 0;
}
.vertical-center-modal .ant-modal {
display: inline-block;
vertical-align: middle;
top: 0;
text-align: left;
}
/*
// Use flex which not working in IE
.vertical-center-modal { .vertical-center-modal {
display: flex; display: flex;
align-items: center; align-items: center;
@ -77,4 +99,5 @@ ReactDOM.render(<App />, mountNode);
.vertical-center-modal .ant-modal { .vertical-center-modal .ant-modal {
top: 0; top: 0;
} }
*/
```` ````