How to achieve vertical centering of iview Modal box

problem description

how to center the iview Modal box vertically

the environmental background of the problems and what methods you have tried

you need to center the Modal box horizontally and vertically. The horizontal is automatically centered, but the vertical centering is not achieved.
position:absolute;
margin:auto;
left:0;
top:0;
right:0;
bottom:0;
this has no effect

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Oct.09,2021

the official website already has demo, centered horizontally and vertically. Just use it directly
https://codeshelper.com/q/10.


<Modal
    title="Title"
    v-model="modal10"
    class-name="vertical-center-modal">
    

Content of dialog

Content of dialog

Content of dialog

</Modal> <style lang="less"> .vertical-center-modal{ display: flex; align-items: center; justify-content: center; .ivu-modal{ top: 0; } }

< / style >

the official website already has demo centered vertically and horizontally
https://www.iviewui.com/compo.

.
Menu