Galeria de imagens CSS


CSS pode ser usado para criar uma galeria de imagens.

<!DOCTYPE html>
<html>
<head>
<style>
div.gallery {
  margin: 5px;
  border: 1px solid #ccc;
  float: left;
  width: 180px;
}

div.gallery:hover {
  border: 1px solid #777;
}

div.gallery img {
  width: 100%;
  height: auto;
}

div.desc {
  padding: 15px;
  text-align: center;
}
</style>
</head>
<body>

<div class="gallery">
  <a target="_blank" href="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png">
    <img src="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png" alt="Cinque Terre" width="600" height="400">
  </a>
  <div class="desc">Add a description of the image here</div>
</div>

<div class="gallery">
  <a target="_blank" href="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png">
    <img src="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png" alt="Forest" width="600" height="400">
  </a>
  <div class="desc">Add a description of the image here</div>
</div>

<div class="gallery">
  <a target="_blank" href="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png">
    <img src="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png" alt="Northern Lights" width="600" height="400">
  </a>
  <div class="desc">Add a description of the image here</div>
</div>

<div class="gallery">
  <a target="_blank" href="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png">
    <img src="https://www.joemaster.com.br/tutoriais/wp-content/uploads/2020/06/img_5ef0e8127daaa-300x169.png" alt="Mountains" width="600" height="400">
  </a>
  <div class="desc">Add a description of the image here</div>
</div>

</body>
</html>


 

 

Categoria: curso css | Tags: , , , , , , , , , , | Postado por joemaster em 03/jul/2020

<< Anterior

Próximo >>

Deixe um comentário

O seu endereço de e-mail não será publicado.