Saltar al contenido

ejemplo de código bootstrap .mb-3, .my-3

Posterior a de una prolongada compilación de datos hemos podido resolver esta inconveniente que suelen tener ciertos de nuestros lectores. Te regalamos la solución y nuestro deseo es que te sea de gran ayuda.

Ejemplo 1: Bootstrap Margen y relleno

Use the margin and padding spacing utilities to control how elements and 
components are spaced and sized. Bootstrap 4 includes a five-level scale for
spacing utilities, based on a 1rem value default $spacer variable. Choose
values for all viewports (e.g., .mr-3 for margin-right: 1rem), or pick
responsive variants to target specific viewports (e.g., .mr-md-3 for 
margin-right: 1rem starting at the md breakpoint).

<divclass="my-0 bg-warning">Margin Y 0div><divclass="my-1 bg-warning">Margin Y 1div><divclass="my-2 bg-warning">Margin Y 2div><divclass="my-3 bg-warning">Margin Y 3div><divclass="my-4 bg-warning">Margin Y 4div><divclass="my-5 bg-warning">Margin Y 5div><divclass="my-auto bg-warning">Margin Y Autodiv>

Ejemplo 2: espaciado de arranque

The classes are named using the format propertysides-size for xs 
and propertysides-breakpoint-size for sm, md, lg, and xl.

Where property is one of:

m - for classes that set margin
p - for classes that set padding

Where sides is one of:

t - for classes that set margin-top or padding-top
b - for classes that set margin-bottom or padding-bottom
l - for classes that set margin-left or padding-left
r - for classes that set margin-right or padding-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 or padding on all 4 sides of the element

Where size is one of:

0 - for classes that eliminate the margin or padding by setting it to 0
1 - (by default) for classes that set the margin or padding to $spacer * .25
2 - (by default) for classes that set the margin or padding to $spacer * .5
3 - (by default) for classes that set the margin or padding to $spacer
4 - (by default) for classes that set the margin or padding to $spacer * 1.5
5 - (by default) for classes that set the margin or padding to $spacer * 3
auto - for classes that set the margin to auto

$spacer defaults to 1rem

Reseñas y puntuaciones

Recuerda que puedes dar difusión a este post si te valió la pena.

¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)



Utiliza Nuestro Buscador

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *