Skip to content

Commit

Permalink
✨hover.css
Browse files Browse the repository at this point in the history
  • Loading branch information
noeypatt committed Mar 28, 2020
1 parent 3cd0e21 commit 4ad622c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const About = () => {
}
<div className="more-content">
<h6>อ่านต่อ</h6>
<img className="animated-fadeRight" src="/static/arrow.svg" alt="arrow-icon" />
<img className="hvr-wobble-horizontal" src="/static/arrow.svg" alt="arrow-icon" />
</div>

</div>
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"bootstrap": "^4.3.1",
"d3-scale": "^3.2.1",
"google-maps-react": "^2.0.2",
"hover.css": "^2.3.2",
"less": "^3.10.3",
"lodash": "^4.17.15",
"moment": "^2.24.0",
Expand Down
1 change: 1 addition & 0 deletions pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class MyDocument extends Document {
<Head>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css" />
<link href="css/hover.css" rel="stylesheet" media="all"></link>
</head>

<meta charset="utf-8" />
Expand Down
30 changes: 30 additions & 0 deletions styles/about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,36 @@
width: 2rem;
height: auto;
}
.hvr-wobble-horizontal:hover {
animation-name: hvr-wobble-horizontal;
animation-duration: 1s;
animation-timing-function: ease-in-out;
animation-iteration-count: 1;
display: inline-block;
vertical-align: middle;
transform: perspective(1px) translateZ(0);
}

@keyframes hvr-wobble-horizontal {
17% {
transform: translateX(8px);
}
34% {
transform: translateX(-6px);
}
50% {
transform: translateX(4px);
}
70% {
transform: translateX(-2px);
}
80% {
transform: translateX(1px);
}
100% {
transform: translateX(0);
}
}
}
}
}
Expand Down

1 comment on commit 4ad622c

@vercel
Copy link

@vercel vercel bot commented on 4ad622c Mar 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.