Curso de Frontend Developer

Toma las primeras clases gratis

<!DOCTYPE html>
<html lang=“es”>
<head>
<meta charset=“UTF-8”>
<meta name=“viewport” content=“width=device-width, initial-scale=1.0”>
<title>Plantas</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

    body {
        font-family: 'Arial', sans-serif;
        background: #f0f8f0;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        padding: 20px;
    }

    .contenedor {
        width: 100%;
        max-width: 320px;
    }

    .tarjeta {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }

    .tarjeta:hover {
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .tarjeta-imagen {
        width: 100%;
        height: 180px;
        overflow: hidden;
    }

    .tarjeta-imagen img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .tarjeta-contenido {
        padding: 20px;
    }

    .tarjeta-contenido h2 {
        color: #2c3e50;
        margin-bottom: 12px;
        font-size: 1.3rem;
        text-align: center;
        transition: color 0.3s ease;
    }

    .tarjeta:hover .tarjeta-contenido h2 {
        color: #27ae60;
    }

    .tarjeta-contenido p {
        color: #7f8c8d;
        line-height: 1.5;
        margin-bottom: 18px;
        text-align: center;
        font-size: 0.9rem;
    }

    .boton {
        display: block;
        padding: 10px 25px;
        background: #e74c3c;
        color: white;
        text-decoration: none;
        border-radius: 20px;
        font-weight: bold;
        transition: all 0.3s ease;
        text-align: center;
        margin: 0 auto;
        width: fit-content;
    }

    .boton:hover {
        background: #27ae60;
        transform: scale(1.05);
    }

    @media (max-width: 480px) {
        .tarjeta-contenido {
            padding: 15px;
        }
        
        .tarjeta-contenido h2 {
            font-size: 1.1rem;
        }
        
        .boton {
            padding: 8px 20px;
            font-size: 0.85rem;
        }
    }
</style>

</head>
<body>
<div class=“contenedor”>
<div class=“tarjeta”>
<div class=“tarjeta-imagen”>
<img src=“https://images.unsplash.com/photo-1416879595882-3373a0480b5b?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80” alt=“Plantas verdes”>
</div>
<div class=“tarjeta-contenido”>
<h2>¿Por qué las plantas son buenas?</h2>
<p>Las plantas purifican el aire, reducen el estrés y mejoran nuestro bienestar emocional. Crean un ambiente más agradable y natural.</p>
<a href="#" class=“boton”>Saber más</a>
</div>
</div>
</div>
</body>
</html>

Curso de Frontend Developer

Toma las primeras clases gratis

0 Comentarios

para escribir tu comentario

Artículos relacionados