- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="es">
<head>
<title>Combinación de clases</title>
<link rel="stylesheet" href="setting.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="cats">
<div>Cupcake</div>
<div>Rodolfo</div>
<div>Copito</div>
<div>Esteban</div>
</div>
</body>
</html>
CSS
body {
padding: 10px;
font-family: "PT Sans", sans-serif;
}
.cats {
position: relative;
width: 390px;
margin: 20px auto;
padding: 20px;
text-align: center;
box-shadow: 0 0 3px #999999;
}
.cats .cat {
display: inline-block;
width: 100px;
height: 100px;
margin: 10px;
padding: 10px;
text-align: center;
color: #ffffff;
background-repeat: no-repeat;
background-position: 50% 80%;
background-size: 64px;
border-radius: 5px;
box-shadow: 0 0 3px #999999;
}
.cats .cat-keksik {
background-color: #3498db;
background-image: url("cat-walk.svg");
}
.cats .cat-rudolf {
background-color: #e74c3c;
background-image: url("cat-grumpy.svg");
}
.cats .cat-snezhok {
background-color: #2ecc71;
background-image: url("cat-w.svg");
}
.cats .cat-stepan {
background-color: #e67e22;
background-image: url("cat-fish.svg");
}
Ha ido a otra página
ObjetivosRealizado
0
- Asigna la clase
cata todos losdivdentro del bloque.cats. - Asigna a cada gato la clase que le corresponde:
cat-keksik,cat-rudolf,cat-snezhok,cat-stepan.