0
respostas

[Projeto] Resolução Desafios - Aula 03

01 Ajustando a altura da tela com CSS

body{
    height: 100vh;
}

02 Controlando o tamanho de elementos com Box Sizing

body{
    box-sizing: border-box;
}

03 Criando um layout sem scroll

body {
  height: 100vh;
  margin: 0;
  background-color: black;
}

* {
  box-sizing: border-box;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;   
  height: 100vh;
}

.bloco {
  width: 40%;
  margin: 0 20px;
  color: white;
  text-align: center;
}

04 Flexbox: alinhando textos e imagens

.container {
  display: flex;
  justify-content: space-between; 
  align-items: center;           
  padding: 20px;
}

.texto {
  flex: 1; 
  margin-right: 20px;
  color: white;
}

.imagem {
  max-width: 40%;
  height: auto;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    text-align: center;
  }

  .imagem {
    max-width: 100%;
    margin-top: 20px;
  }
}

05 Flexbox: Centralização vertical

.container {
  display: flex;
  align-items: center; 
  height: 100px;       
}

06

.responsivo-container {
  display: flex;
  flex-direction: row; 
  flex-wrap: wrap;     
  gap: 20px;          
  padding: 20px;
}