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
|
order: 7
|
||||||
|
debug: true
|
||||||
title:
|
title:
|
||||||
zh-CN: 手动移除
|
zh-CN: 手动移除
|
||||||
en-US: Manual to destroy
|
en-US: Manual to destroy
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
````
|
````
|
||||||
|
Loading…
Reference in New Issue
Block a user