Skip to content

Instantly share code, notes, and snippets.

@theuves
Last active February 11, 2018 20:11
Show Gist options
  • Select an option

  • Save theuves/44a33c37c32fce1106e2cb459651b274 to your computer and use it in GitHub Desktop.

Select an option

Save theuves/44a33c37c32fce1106e2cb459651b274 to your computer and use it in GitHub Desktop.
Uma simples animação para aguardar o carregamento de imagens.
<style>
@keyframes change {
from {background-color: #eee;}
to {background-color: #f4f4f4;}
}
.img {
position: relative;
border: solid 2px #ddd;
width: 300px;
height: 300px;
animation: change 0.5s infinite alternate;
}
.img span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-family: Georgia, serif;
font-weight: bold;
color: #333;
}
</style>
<div class="img">
<span>Carregando...</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment