APRENDE CSS DE FORMA VISUAL

Explorá el diseño web a través de ejemplos visuales y claros

Secciones

 

POSITION FIXED:
.fixed{.....; position: fixed; top: calc(80% - 80px) ; right: 20px;}
.nofixed{.....; background-color: yellow;}

fixed
no-fixed

 



POSITION STICKY TOP: A medida que bajamos sticky mantiene 10px de distancia del tope


.divsticky {display: relative; width: 100%; height:800px; background-color:#333;}
.sticky {....; position: sticky; top: 10px ; right: 150px;}
.nosticky{....; background-color: yellow;}

sticky
no sticky

 



POSITION STICKY BOTTOM: A medida que subimos sticky1 y sticky2 mantienen 10px de distancia del fondo


.divsticky1 {display: relative; width: 100%; height:600px; background-color:#333;}
.nosticky1{...; background-color: yellow;}
.sticky1 {...;red ; position: sticky; bottom: 10px ; right: 150px;}
.sticky2 {...;green ; position: sticky; bottom: 10px ; right: 150px;}

no sticky
sticky1
sticky2