How can I centralize a Bootstrap V4 modal with CSS?
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
Using Flexbox its really easy to add vertical align bootstrap 4 modal popup. Here's the CSS Code.
See Woking Demo
SASS
Compiled CSS
See Woking Demo
You can vertical center the modal by overriding the position of the
.modal-dialog
like this..http://www.codeply.com/go/14Ki1kyTgo
Update 2018
As of Bootstrap 4 Beta 3, there is a new
modal-dialog-centered
class that can be used instead of the custom method described above.https://www.codeply.com/go/lpOtIFoN6E (Beta 3)