CSS Sprites
Css Sprites y Botón animado
<!DOCTYPE html>
<html lang="es">
<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>Css animation - Sprite</title>
</head>
<body>
<style>
.ciudad{
margin: 0 auto;
width: 844px;
height: 339px;
background: url("jpg.jpg");
position: relative;
animation: fondoanimado 5s linear infinite;
}
@keyframes fondoanimado {
0% {
background-position: 0px;
}
100% {
background-position: -844px;
}
}
.corriendo{
margin: 0 auto;
height: 168px;
width: 128px;
position: absolute;
left: 40%;
bottom: 15px;
background: url("corriendo.fw.png");
animation: correr 1s steps(8) infinite;
}
@keyframes correr {
0% {
background-position: 0px;
}
100% {
background-position: -1024px;
}
}
.boton{
display: flex;
justify-content: center;
margin-top: 20px;
}
button{
background: rgb(32, 80, 151);
cursor: pointer;
border: none;
padding: 16px 32px;
color: aliceblue;
font-size: 24px;
font-weight: bold;
position:relative;
border-radius: 12px;
}
button::before{
content: "";
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
background: linear-gradient(
45deg,
red,blue,deeppink,blue,
red,blue,deeppink,blue
);
background-size: 800%;
border-radius:10px;
filter:blur(18px);/*blur agrega un desenfoque a un elemento.*/
animation: intermitente 20s linear infinite;
}
@keyframes intermitente {
0%{
background-position: 0 0;
} 50%{
background-position: 400% 0;
} 100%{
background-position:0 0;
}
}
</style>
<div class="ciudad">
<div class="corriendo"></div>
</div>
<div class="boton">
<button>Boton Luminiscente</button>
</div>
</body>
</html>
Comentarios
Publicar un comentario