CSS Desde Cero (2018) | Position 1

Obed Paz @yunk99

Yo lo hice un poco diferente ya que mi imagen es muy grande y debia ajustarla al tamaño de mi contenedor, pero me salio el mismo resultado. Excelente clase, felicidades y gracias a EdTeam por tan buen trabajo.

1<div class="card"> 2 <div class="text-background"> 3 <p class="card-title">Welcome</p> 4 </div> 5 </div> ~~~ 6 7~~~ CSS 8.card{ 9 position: relative; 10 width: 30%; 11 height: 80%; 12 background-image: url(./images/cody-lannom-aeYQSnN4dOo-unsplash.jpg); 13 background-size: cover; 14 margin-left: 4.5em; 15 border: solid .4em #fff; 16} 17 18.text-background{ 19 width: 100%; 20 height: 10%; 21 position: absolute; 22 top: 90%; 23 background-color: rgba(0, 0, 0, .65); 24 color: #fff; 25 display: flex; 26 justify-content: center; 27 align-items: center; 28 font-size: 1.4em; 29} ~~~

Escribe una respuesta