Skip to content

Commit

Permalink
Add hover-highlight-right
Browse files Browse the repository at this point in the history
  • Loading branch information
jolaleye committed Apr 27, 2019
1 parent b653a9e commit 7bda1e9
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions effects/hover-highlight-right.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<span>Hover</span>
</template>

<style scoped>
span {
position: relative;
z-index: 1;
}
span::before {
content: '';
position: absolute;
z-index: -1;
top: 0;
bottom: 0;
left: -0.25em;
right: -0.25em;
background-color: hsla(341, 97%, 59%, 0.75);
transform-origin: center right;
transform: scaleX(0);
transition: transform 0.2s ease-in-out;
}
span:hover::before {
transform: scaleX(1);
transform-origin: center left;
}
</style>

0 comments on commit 7bda1e9

Please sign in to comment.