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,6 +1,7 @@
---
order: 7
title:
debug: true
title:
zh-CN: 手动移除
en-US: Manual to destroy
---

View File

@ -1,6 +1,6 @@
---
order: 7
title:
title:
zh-CN: 自定义位置
en-US: To customize the position of modal
---
@ -68,6 +68,28 @@ ReactDOM.render(<App />, mountNode);
````css
/* 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 {
display: flex;
align-items: center;
@ -77,4 +99,5 @@ ReactDOM.render(<App />, mountNode);
.vertical-center-modal .ant-modal {
top: 0;
}
*/
````