Skip to content

Commit

Permalink
Merge pull request #57 from prat1k-gupta/prat1k
Browse files Browse the repository at this point in the history
added the text hover effect #54
  • Loading branch information
avincodes authored Oct 16, 2022
2 parents 712d581 + 520daf7 commit 7e47f5e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CSS text hover effect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Multicolor underline hover effect

![image](https://user-images.githubusercontent.com/92115707/196000815-8f2a291c-ae81-45c5-97a5-d948050ce664.png)

A cool multicolor underline hover effect

Use it to highlight important term or quote.

17 changes: 17 additions & 0 deletions CSS text hover effect/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<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">
<link rel="stylesheet" href="style.css">
<title>hover effect</title>
</head>
<body>
<div class="container">
<p>
There were a variety of ways to win the game. <a href="#" class="effect">James had played it long enough to know most of them</a> and he could see what his opponent was trying to do. There was a simple counterattack that James could use and the game should be his.
</p>
</div>
</body>
</html>
33 changes: 33 additions & 0 deletions CSS text hover effect/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
body{
background-color: #0093E9;
background-image: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);
margin: 0;
height: 100vh;
overflow: hidden;
font-family: 'Monsterrat',sans-serif;
}
.container{
padding: 7px;
margin: 240px auto;
width: 70%;
border: 2px solid white;
border-radius: 5px;
}
p{
color: white;
text-align: center;
line-height: 1.5;
}
.effect{
background-image: linear-gradient(90deg,red,blue);
background-size: 0% 4px;
background-repeat: no-repeat;
background-position: left bottom;
text-decoration: none;
font-weight: bold;
color: white;
transition: background-size 300ms linear;
}
.effect:hover{
background-size: 100% 4px;
}

0 comments on commit 7e47f5e

Please sign in to comment.