mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
Add compatible css centered demo code, close #3849
This commit is contained in:
parent
1750fc754c
commit
f9319e244b
@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 7
|
||||
debug: true
|
||||
title:
|
||||
zh-CN: 手动移除
|
||||
en-US: Manual to destroy
|
||||
|
@ -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;
|
||||
}
|
||||
*/
|
||||
````
|
||||
|
Loading…
Reference in New Issue
Block a user