Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b86a49
commit 9781655
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!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"> | ||
<title>Section 5-5 - Top and Bottom Reverse Effect</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
|
||
<body> | ||
|
||
<h2>Top and Bottom Reverse Effect</h2> | ||
|
||
<div class="link-container"> | ||
<a href="#" class="link top-and-bottom-left-to-right">Top and Bottom Left to Right Reverse Effect</a> | ||
</div> | ||
|
||
<div class="link-container orange-red"> | ||
<a href="#" class="link top-and-bottom-right-to-left">Top and Bottom Right to Left Reverse Effect</a> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
*{ | ||
box-sizing: border-box; | ||
} | ||
|
||
.link-container{ | ||
background-color: darkcyan; | ||
padding:1rem; | ||
height:200px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.link-container.orange-red{ | ||
background-color: orangered; | ||
} | ||
|
||
.link{ | ||
text-decoration: none; | ||
font-size:24px; | ||
color:white; | ||
position:relative; | ||
} | ||
|
||
.top-and-bottom-left-to-right::before{ | ||
content: ''; | ||
position:absolute; | ||
width:0; | ||
height:5px; | ||
background-color: yellow; | ||
border-radius: 4px; | ||
top:0; | ||
left:0; | ||
transition: width 0.75s ease; | ||
} | ||
|
||
.top-and-bottom-left-to-right::after{ | ||
content: ''; | ||
position:absolute; | ||
width:0; | ||
height:5px; | ||
background-color: yellow; | ||
border-radius: 4px; | ||
bottom:0; | ||
right:0; | ||
transition: width 0.75s ease; | ||
} | ||
|
||
.top-and-bottom-left-to-right:hover::before, .top-and-bottom-left-to-right:hover::after{ | ||
width:100%; | ||
} | ||
|
||
.top-and-bottom-right-to-left::before{ | ||
content: ''; | ||
position:absolute; | ||
width:0; | ||
height:5px; | ||
background-color: pink; | ||
border-radius: 4px; | ||
top:0; | ||
right:0; | ||
transition: width 0.75s ease; | ||
} | ||
|
||
.top-and-bottom-right-to-left::after{ | ||
content: ''; | ||
position:absolute; | ||
width:0; | ||
height:5px; | ||
background-color: pink; | ||
border-radius: 4px; | ||
bottom:0; | ||
left:0; | ||
transition: width 0.75s ease; | ||
} | ||
|
||
.top-and-bottom-right-to-left:hover::before, .top-and-bottom-right-to-left:hover::after{ | ||
width:100%; | ||
} |