Skip to content

Instantly share code, notes, and snippets.

@joseolinda
Created March 14, 2023 00:17
Show Gist options
  • Save joseolinda/ee39ed5d16741790191eb048d46f81eb to your computer and use it in GitHub Desktop.
Save joseolinda/ee39ed5d16741790191eb048d46f81eb to your computer and use it in GitHub Desktop.
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
font-size: 16px;
padding: 0;
margin: 0;
background-color: #413543;
}
header {
background-color: #1b1029;
color: #bba2dc;
text-align: center;
padding: 16px;
}
.titulo {
font-size: 2.5em;
margin: 16px 0;
}
.subtitulo {
margin: 0;
margin-bottom: 8px;
color: #f3f3f3;
}
.creditos::before {
content: "Imagens ©";
font-weight: thin;
color: #f3f3f3;
}
.creditos {
margin: 0;
background: #2b1a40;
padding: 8px 16px;
margin-top: 16px;
display: inline-block;
position: absolute;
top: 24px;
right: 24px;
}
.creditos a {
color: #F0EB8D;
text-decoration: none;
font-weight: bold;
}
/* Estiliza a seção da galeria */
#galeria {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
#imagem-principal {
text-align: center;
width: 90%;
height: 1024px;
max-height: 80vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
position: relative;
}
.texto-alternativo {
color: #F0EB8D;
padding: 16px 8px;
}
#imagem-principal img {
max-width: 100%;
max-height: 500px;
margin-bottom: 20px;
}
#imagens {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
#imagens img {
width: 100px;
height: 100px;
margin: 5px;
cursor: pointer;
border: 3px solid white;
transition: all 0.3s ease-in-out;
}
#imagens img:hover {
border-color: #333;
transform: scale(1.2);
}
#imagem-principal:hover .anterior,
#imagem-principal:hover .proximo {
display: block;
}
.anterior,
.proximo {
display: none;
font-size: 1em;
background-color: #333;
color: white;
border: none;
cursor: pointer;
outline: none;
position: absolute;
padding: 16px;
}
.anterior span,
.proximo span {
padding: 0 8px;
display: none;
}
.anterior {
left: 48px;
}
.proximo {
right: 48px;
}
.anterior:hover,
.proximo:hover {
background-color: #964af3;
}
.anterior:hover span,
.proximo:hover span{
display: inline-block;
}
#imagens img.selecionada {
border-color: #964af3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment