Boostrap 4 Funciones Principales
Margin y Padding El margen no afecta al elemento y el padding si
Where property is one of:
m
- for classes that setmargin
p
- for classes that setpadding
Where sides is one of:
t
- for classes that setmargin-top
orpadding-top
b
- for classes that setmargin-bottom
orpadding-bottom
l
- for classes that setmargin-left
orpadding-left
r
- for classes that setmargin-right
orpadding-right
x
- for classes that set both*-left
and*-right
y
- for classes that set both*-top
and*-bottom
- blank - for classes that set a
margin
orpadding
on all 4 sides of the element
Ejemplo:
<h1 class="bg-success mt-5">Main</h1>
A todos los lados:
<h1 class="bg-success p-5">Main</h1>
Ancho de los elementos en porcentaje 25%:
<div class="bg-success w-25">Main</div>
No hay comentarios.