CSS Styling Techniques and Responsive Design
Classified in Visual arts
Written on in English with a size of 9.39 KB
Table Styles
/* 1. Agregar borde a todas las celdas */
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 10px;
text-align: left;
}
/* 2. Alternar colores de fondo en las filas */
tr:nth-child(odd) {
background-color: white;
}
tr:nth-child(even) {
background-color: lightgray;
}
/* 3. Aplicar fondo amarillo a la primera fila */
tr:first-child {
background-color: yellow;
}
/* 4. Cambiar color de fondo al pasar el mouse */
tr:hover {
background-color: lightblue;
}
Card Styles
/* 1. Estilos generales para las tarjetas */
.tarjeta {
background-color: #f5f5f5;
padding: 20px;
margin: 15px;
border-radius: 10px;
text-align: center;
transition: transform 0.3s, background-color... Continue reading "CSS Styling Techniques and Responsive Design" »