-
Notifications
You must be signed in to change notification settings - Fork 0
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
d55abff
commit db7ff95
Showing
3 changed files
with
126 additions
and
1 deletion.
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
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,16 @@ | ||
$(document).ready(function (){ | ||
//two function to add and remove the class in the span | ||
function add(){ | ||
$(".copied").addClass("bounce-effect"); | ||
} | ||
function remove(){ | ||
$(".copied").removeClass("bounce-effect"); | ||
} | ||
|
||
$(".copy-btn").click(function (){ | ||
$("#textField").select(); | ||
document.execCommand("copy"); | ||
add(); | ||
setTimeout(remove,800); | ||
}); | ||
}); |
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,103 @@ | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
body{ | ||
margin: 0; | ||
padding: 0; | ||
height: 100vh; | ||
background-color: #f3f4f7; | ||
font-family: 'montserrat',sans-serif; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
input,textarea,button{ | ||
font-family: inherit; | ||
} | ||
.container{ | ||
width: 420px; | ||
height: 530px; | ||
padding: 25px; | ||
background-color: #f3f4f7; | ||
border-radius: 10px; | ||
box-shadow: 0 0 25px rgba(83,87,95,0.25); | ||
} | ||
h1{ | ||
padding: 20px 0; | ||
color: #090909; | ||
font-size: 30px; | ||
font-weight: 700; | ||
text-align: center; | ||
text-transform: uppercase; | ||
} | ||
.text-field{ | ||
width: 100%; | ||
height: 230px; | ||
margin: 20px 0; | ||
padding: 10px; | ||
background: transparent; | ||
border: 1px solid #52565e; | ||
font-size: 16px; | ||
font-weight: 400; | ||
outline: none; | ||
resize: none; | ||
} | ||
.copy-btn{ | ||
padding: 10px 15px; | ||
color: #f3f4f7; | ||
background-color: #037ef3; | ||
border-radius: 5px; | ||
font-size: 16px; | ||
font-weight: 600; | ||
text-transform: uppercase; | ||
border: none; | ||
outline: none; | ||
cursor: pointer; | ||
} | ||
.copy-btn i{ | ||
padding-left: 10px; | ||
} | ||
.copy-btn:active{ | ||
transform: scale(0.98); | ||
} | ||
span.copied{ | ||
display: block; | ||
margin-top: 50px; | ||
text-align: center; | ||
font-size: 26px; | ||
color: #858585; | ||
transform: scale(0); | ||
transition: all 0.5s; | ||
} | ||
span.bounce-effect{ | ||
animation: bounceIn 0.8s linear; | ||
} | ||
|
||
/* BounceIn Animation*/ | ||
|
||
@keyframes bounceIn { | ||
0%{ | ||
opacity: 0; | ||
transform: scale(0.3); | ||
} | ||
20%{ | ||
transform: scale(1.1); | ||
} | ||
40%{ | ||
transform: scale(0.9); | ||
} | ||
60%{ | ||
opacity: 1; | ||
transform: scale(1.03); | ||
} | ||
80%{ | ||
transform: scale(0.97); | ||
} | ||
100%{ | ||
opacity: 1; | ||
transform: scale(1); | ||
} | ||
} |