★ Essencial
width / height
Largura e altura de um elemento.
Sintaxe
width: 100%;
height: 300px;
max-width: 600px;
min-height: 100vh;min-/max- definem limites sem travar um valor fixo — muito usados para responsividade. '100vh' é a altura total da tela.
Exemplo
.elemento {
width:180px;
height:60px;
background:#dbeafe;
}Testar ao vivo
Edite as declarações CSS e veja o efeito na caixa B.
Você também pode procurar por