Curso de Frontend Developer

Toma las primeras clases gratis

COMPARTE ESTE ARTÍCULO Y MUESTRA LO QUE APRENDISTE

Paso 01. Creación del HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>

Paso 02. Creación del body.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <section>
        <div class="card">
            <img src="https://images.pexels.com/photos/726478/pexels-photo-726478.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1" alt="shark_01">
            <p>Shark</p>
            <p>01</p>
        </div>
        <div></div>
        <div class="card">
            <img src="https://images.pexels.com/photos/7826551/pexels-photo-7826551.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1" alt="shark_02">
            <p>Shark</p>
            <p>02</p>
        </div>
    </section>
</body>
</html>

Paso 03. Creación del estilo.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        section{
            width: 100%;
            display: flex;
            justify-content: center;
            flex-direction:row;
        }
        @media (max-width:799px){
            section{
                flex-direction:column;
            }
        
        }
        .card{
          width: 400px;  
          height: 400px;
          background: papayawhip;
          border-radius: 20px;
          overflow: hidden;
        }
        .card img{
            width: 100%;
        }
        .card p{
            text-align: center;
        }
        .card p:nth-child(3){
            color:RED
        }


    </style>
</head>
<body>
    <section>
        <div class="card">
            <img src="https://images.pexels.com/photos/726478/pexels-photo-726478.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1" alt="shark_01">
            <p>Shark</p>
            <p>01</p>
        </div>
        <div></div>
        <div class="card">
            <img src="https://images.pexels.com/photos/7826551/pexels-photo-7826551.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1" alt="shark_02">
            <p>Shark</p>
            <p>02</p>
        </div>
    </section>
</body>
</html>

Saludos!

Curso de Frontend Developer

Toma las primeras clases gratis

COMPARTE ESTE ARTÍCULO Y MUESTRA LO QUE APRENDISTE

0 Comentarios

para escribir tu comentario

Artículos relacionados