Today, I'm going to explain the steps for configure Bootstrap in an Angular application.
First of all, we have to add Bootstrap in our application with:
> npm install --save ngx-bootstrap@latest
Then, we have to open the index.html file and add:
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
Then, we have all we need for use Bootstrap 3 in Angular 4.
Now, we have to configure all the html files following the structure:
<div class="row">
<div class="col-xs-12 col-sm-6 col-lg-3">
...
</div>
... (any repeations you need)
</div>
You have to know that any div with class col-**-** need a parent div with class row.
Also, you have to know that col-xs is for mobiles dispositive, col-sm for tablets dispositives and col-lg for computer dispositive.
Here you have the documentation of the Bootstrap 3 style; All you need is here:
When you domain all this css styles, you can improve new approach for your develops.
Try it and have fun!
No hay comentarios:
Publicar un comentario