How to center this form in Bootstrap 4? [duplicate]
问题 This question already has answers here : Align the form to the center in Bootstrap 4 (3 answers) Closed last year . HTML <div class="container-fluid background"> <div class="row"> <!-- background effect --> <div id="particles-js"> <div class="login col-12"> <form class="login-form" method="post" action=""> <div class="form-group col"> <h2 class="login-header">Login</h2> </div> <div class="col form-group"> <input type="text" name="username" placeholder="Username" class="username-input"> </div>