Skip to content

Instantly share code, notes, and snippets.

@gsans
Created May 9, 2019 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsans/a8f3f9142ea7670157de63e2c9fefaba to your computer and use it in GitHub Desktop.
Save gsans/a8f3f9142ea7670157de63e2c9fefaba to your computer and use it in GitHub Desktop.
Floating Cat
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-cat',
template: `
<div>
<a href="http://aws.amazon.com/amplify" target="_blank" alt="AWS Amplify" title="Miau"><img class="cat btn" src="data:image/png;base64,iVBORw..."/></a>
</div>
`,
styles: [`
.cat {
width: 30%;
top: 7vh;
position: absolute;
animation: hover 2s infinite alternate;
}
@keyframes hover {
to {
transform: translateY(10px);
}
}
`]
})
export class CatComponent { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment